Skip to content

Commit

Permalink
always fill can frames with 0 at initialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
bugobliterator authored and tridge committed Feb 19, 2022
1 parent 5fb0eac commit 5eec022
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libuavcan/include/uavcan/driver/can.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ struct UAVCAN_EXPORT CanFrame
{
UAVCAN_ASSERT(can_data != UAVCAN_NULLPTR);
UAVCAN_ASSERT(data_len == dlc);
fill(data, data + MaxDataLen, uint8_t(0));
(void)copy(can_data, can_data + data_len, this->data);
if (data_len <= 8) {
dlc = data_len;
Expand Down

0 comments on commit 5eec022

Please sign in to comment.