Skip to content

Commit

Permalink
safer comparison of CAN frame size
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Sep 25, 2024
1 parent a34e0bb commit ec29c21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firmware/can_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class CanTxMessage
template <typename TData>
class CanTxTyped final : public CanTxMessage
{
static_assert(sizeof(TData) == sizeof(CANTxFrame::data8));
static_assert(sizeof(TData) <= sizeof(CANTxFrame::data8));

public:
explicit CanTxTyped(uint32_t eid) : CanTxMessage(eid) { }
Expand Down

0 comments on commit ec29c21

Please sign in to comment.