From 80e7408e039abd71b713a367e4095735ea2c897c Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Thu, 10 Feb 2022 11:58:33 -0800 Subject: [PATCH] reinit our command as we start parsing Signed-off-by: Jesse Vincent --- .../src/kaleidoscope/plugin/FocusSerial.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp b/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp index d209beb9..dd5ee3c4 100644 --- a/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp +++ b/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp @@ -32,6 +32,8 @@ EventHandlerResult FocusSerial::afterEachCycle() { return EventHandlerResult::OK; uint8_t i = 0; + memset(command_, 0, sizeof(command_)); + do { command_[i++] = Runtime.serialPort().read();