Skip to content

Commit

Permalink
Merge pull request #153 from asfishman/srf/toggle
Browse files Browse the repository at this point in the history
Fix hardcoded initial toggle state requirement
  • Loading branch information
pavel-kirienko authored Sep 30, 2020
2 parents bb5cda1 + f4fa55c commit 253794a
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 253794a

Please sign in to comment.