mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 06:23:34 +08:00
Verbose logging on CRC failure
This commit is contained in:
@@ -83,7 +83,13 @@ bool TransferListenerBase::checkPayloadCrc(const uint16_t compare_with, const Tr
|
||||
offset += res;
|
||||
crc.add(buf, res);
|
||||
}
|
||||
return crc.get() == compare_with;
|
||||
if (crc.get() != compare_with)
|
||||
{
|
||||
UAVCAN_TRACE("TransferListenerBase", "CRC mismatch, expected=0x%04x, got=0x%04x",
|
||||
int(compare_with), int(crc.get()));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void TransferListenerBase::handleReception(TransferReceiver& receiver, const RxFrame& frame,
|
||||
|
||||
Reference in New Issue
Block a user