Skip to content

Commit

Permalink
AP_DroneCAN: fixup to fix of handling of empty entry
Browse files Browse the repository at this point in the history
This resolves a small difference between vehicles for the 4.5.6-beta1 release
  • Loading branch information
rmackay9 committed Aug 21, 2024
1 parent 9e70200 commit 5444983
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AP_DroneCAN/AP_DroneCAN_DNA_Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5444983

Please sign in to comment.