Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
timoxd7 committed Dec 11, 2019
1 parent f48ccc7 commit 94f5555
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Communication/CANMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@ class CANMessage : public CAN_Message {
type = CANData;
format = CANStandard;
id = 0;
memset(data, 0, 8);
memSet<uint8_t>(data, 0, 8);
}

CANMessage(uint32_t _id, const uint8_t *_data, uint8_t _len, CANType _type = CANData, CANFormat _format = CANStandard) {
len = _len & 0xF;
type = _type;
format = _format;
id = _id;
memcpy(data, _data, _len);
memCpy<uint8_t>(data, _data, _len);
}

CANMessage(uint32_t _id, CANFormat _format = CANStandard) {
len = 0;
type = CANRemote;
format = _format;
id = _id;
memset(data, 0, 8);
memSet<uint8_t>(data, 0, 8);
}
};

Expand Down

0 comments on commit 94f5555

Please sign in to comment.