Skip to content

Commit

Permalink
Fix hardcoded initial toggle state requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
asfishman committed Sep 30, 2020
1 parent bb5cda1 commit f4fa55c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcanard/canard.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ CANARD_PRIVATE uint8_t txMakeTailByte(const bool start_of_transfer,
const bool toggle,
const CanardTransferID transfer_id)
{
CANARD_ASSERT(start_of_transfer ? toggle : true);
CANARD_ASSERT(start_of_transfer ? (toggle == INITIAL_TOGGLE_STATE) : true);
return (uint8_t)((start_of_transfer ? TAIL_START_OF_TRANSFER : 0U) | (end_of_transfer ? TAIL_END_OF_TRANSFER : 0U) |
(toggle ? TAIL_TOGGLE : 0U) | (transfer_id & CANARD_TRANSFER_ID_MAX));
}
Expand Down

0 comments on commit f4fa55c

Please sign in to comment.