Skip to content

Commit

Permalink
Crash prevention for c5ble
Browse files Browse the repository at this point in the history
  • Loading branch information
GenoJAFord committed Jul 20, 2020
1 parent 98a7b29 commit f1ceff6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/diagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ static void sendPartialMessage(long timestamp,

int numWritten = snprintf(messageBuffer,
MAX_MULTI_FRAME_MESSAGE_SIZE,
"{\"timestamp\":%ld,\"frame\":%d,\"message_id\":%d,\"bus\":%d,\"total_size\":%d,\"mode\":%d,\"pid\":%d,\"value\":%d",
"{\"timestamp\":%ld,\"frame\":%d,\"id\":%d,\"bus\":%d,\"total_size\":%d,\"mode\":%d,\"pid\":%d,\"value\":%d",
timestamp,
frame,
message_id+8,
Expand Down
2 changes: 1 addition & 1 deletion src/platform/pic32/usb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void openxc::interface::usb::processSendQueue(UsbDevice* usbDevice) {
UsbEndpoint* endpoint = &usbDevice->endpoints[i];

// Don't touch usbDevice->sendBuffer if there's still a pending transfer
if(waitForHandle(usbDevice, endpoint)) {
if(!waitForHandle(usbDevice, endpoint)) {
return;
}

Expand Down

0 comments on commit f1ceff6

Please sign in to comment.