From 5c414694d3a4891e8296891709c3dac62d37d439 Mon Sep 17 00:00:00 2001 From: David Crocker Date: Wed, 26 May 2021 13:35:18 +0100 Subject: [PATCH] Expanded movement message sequence numbers from 3 to 7 bits --- src/CAN/CanMotion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CAN/CanMotion.cpp b/src/CAN/CanMotion.cpp index e1af5bb8fc..6c8e72b601 100644 --- a/src/CAN/CanMotion.cpp +++ b/src/CAN/CanMotion.cpp @@ -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