v1.14.0 #304
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user