Merge branch 'master' into uart_dma2
This commit is contained in:
commit
19be269f87
|
@ -445,11 +445,11 @@ void runBinaryProtocolLoop(ts_channel_s *tsChannel, bool isConsoleRedirect) {
|
||||||
uint8_t firstByte;
|
uint8_t firstByte;
|
||||||
int recieved = tunerStudioReadData(tsChannel, &firstByte, 1);
|
int recieved = tunerStudioReadData(tsChannel, &firstByte, 1);
|
||||||
#if EFI_SIMULATOR || defined(__DOXYGEN__)
|
#if EFI_SIMULATOR || defined(__DOXYGEN__)
|
||||||
logMsg("recieved %d\r\n", recieved);
|
logMsg("received %d\r\n", received);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
if (recieved != 1) {
|
if (received != 1) {
|
||||||
// tunerStudioError("ERROR: no command");
|
// tunerStudioError("ERROR: no command");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -513,8 +513,8 @@ void runBinaryProtocolLoop(ts_channel_s *tsChannel, bool isConsoleRedirect) {
|
||||||
recieved = tunerStudioReadData(tsChannel, (uint8_t * ) (tsChannel->crcReadBuffer + 1),
|
recieved = tunerStudioReadData(tsChannel, (uint8_t * ) (tsChannel->crcReadBuffer + 1),
|
||||||
incomingPacketSize + CRC_VALUE_SIZE - 1);
|
incomingPacketSize + CRC_VALUE_SIZE - 1);
|
||||||
int expectedSize = incomingPacketSize + CRC_VALUE_SIZE - 1;
|
int expectedSize = incomingPacketSize + CRC_VALUE_SIZE - 1;
|
||||||
if (recieved != expectedSize) {
|
if (received != expectedSize) {
|
||||||
scheduleMsg(&tsLogger, "Got only %d bytes while expecting %d for command %c", recieved,
|
scheduleMsg(&tsLogger, "Got only %d bytes while expecting %d for command %c", received,
|
||||||
expectedSize, command);
|
expectedSize, command);
|
||||||
tunerStudioError("ERROR: not enough bytes in stream");
|
tunerStudioError("ERROR: not enough bytes in stream");
|
||||||
sendResponseCode(TS_CRC, tsChannel, TS_RESPONSE_UNDERRUN);
|
sendResponseCode(TS_CRC, tsChannel, TS_RESPONSE_UNDERRUN);
|
||||||
|
|
Loading…
Reference in New Issue