v1.14.0 #304

Merged
muellerr merged 366 commits from develop into main 2022-10-10 17:46:38 +02:00
Showing only changes of commit ba56c72d91 - Show all commits

View File

@ -893,9 +893,7 @@ void PlocSupervisorHandler::setExecutionTimeout(DeviceCommandId_t command) {
} }
ReturnValue_t PlocSupervisorHandler::verifyPacket(const uint8_t* start, size_t foundLen) { ReturnValue_t PlocSupervisorHandler::verifyPacket(const uint8_t* start, size_t foundLen) {
uint16_t receivedCrc = *(start + foundLen - 2) << 8 | *(start + foundLen - 1); if (CRC::crc16ccitt(start, foundLen) != 0) {
uint16_t recalculatedCrc = CRC::crc16ccitt(start, foundLen - 2);
if (receivedCrc != recalculatedCrc) {
return SupvReturnValuesIF::CRC_FAILURE; return SupvReturnValuesIF::CRC_FAILURE;
} }
return RETURN_OK; return RETURN_OK;