From 7ff258dfd4024b39ff1ce2624e79bb59bfd6b4ae Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sun, 7 Jan 2018 01:06:58 -0800 Subject: [PATCH] Fix SendAsyncMessage to place message in correct location (#18) --- src/MessageTask.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MessageTask.cpp b/src/MessageTask.cpp index 3f4fe36..ca2dfd2 100644 --- a/src/MessageTask.cpp +++ b/src/MessageTask.cpp @@ -32,7 +32,7 @@ bool MessageTask::SendAsyncMessage(const Message& message, bool withinIsr) if (nextIndex != _indexFront) { // copy message into queue - volatile uint8_t* pQueue = _pQueue + (nextIndex * _messageSize); + volatile uint8_t* pQueue = _pQueue + (_indexBack * _messageSize); const uint8_t* pMessage = (const uint8_t*)&message; for (uint8_t i = 0; i < message.Size; i++) {