mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_DroneCAN: fixup to fix of handling of empty entry
This resolves a small difference between vehicles for the 4.5.6-beta1 release
This commit is contained in:
parent
85c6a9c78a
commit
24abff5fb1
@ -203,7 +203,7 @@ bool AP_DroneCAN_DNA_Server::isValidNodeDataAvailable(uint8_t node_id)
|
||||
NodeData node_data;
|
||||
readNodeData(node_data, node_id);
|
||||
|
||||
uint8_t empty_hwid[sizeof(NodeData::hwid_hash)] = {0};
|
||||
uint8_t empty_hwid[sizeof(NodeData::hwid_hash)] {};
|
||||
uint8_t crc = crc_crc8(node_data.hwid_hash, sizeof(node_data.hwid_hash));
|
||||
if (crc == node_data.crc && memcmp(&node_data.hwid_hash[0], &empty_hwid[0], sizeof(empty_hwid)) != 0) {
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user