Skip to content

Commit

Permalink
Expanded movement message sequence numbers from 3 to 7 bits
Browse files Browse the repository at this point in the history
  • Loading branch information
dc42 committed May 26, 2021
1 parent 61a6bcc commit 5c41469
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CAN/CanMotion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ uint32_t CanMotion::FinishMovement(uint32_t moveStartTime) noexcept
buf->msg.moveLinear.whenToExecute = moveStartTime;
uint8_t& seq = nextSeq[buf->id.Dst()];
buf->msg.moveLinear.seq = seq;
seq = (seq + 1) & 7;
seq = (seq + 1) & 0x7F;
buf->dataLength = buf->msg.moveLinear.GetActualDataLength();
CanMessageBuffer * const nextBuffer = buf->next; // must get this before sending the buffer, because sending the buffer releases it
CanInterface::SendMotion(buf); // queues the buffer for sending and frees it when done
Expand Down

0 comments on commit 5c41469

Please sign in to comment.