From 6ad5c07e6d4dd438d4b43a9d51bb976a97caeb4a Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Thu, 21 Feb 2019 14:28:05 +0100 Subject: [PATCH] comments --- Firmware/cmdqueue.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Firmware/cmdqueue.cpp b/Firmware/cmdqueue.cpp index 2f892c9cf..c7035ba13 100644 --- a/Firmware/cmdqueue.cpp +++ b/Firmware/cmdqueue.cpp @@ -94,7 +94,11 @@ void cmdqueue_reset() bufindr = 0; bufindw = 0; buflen = 0; - cmdbuffer_front_already_processed = true; + + //commands are removed from command queue after process_command() function is finished + //reseting command queue and enqueing new commands during some (usually long running) command processing would cause that new commands are immediately removed from queue (or damaged) + //this will ensure that all new commands which are enqueued after cmdqueue reset, will be always executed + cmdbuffer_front_already_processed = true; } // How long a string could be pushed to the front of the command queue?