From 990f27d126ad0cdc411cb2a7a88f4f4bd515cd2a Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Tue, 27 Dec 2011 23:06:15 +0100 Subject: [PATCH] Sketch loop(): Reset command buffer after execution --- sketch/lasic.pde | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sketch/lasic.pde b/sketch/lasic.pde index ec0e262..89ece30 100644 --- a/sketch/lasic.pde +++ b/sketch/lasic.pde @@ -41,11 +41,9 @@ void loop() { if (InByte == 10 || InByte == 13 ) { //Serial.println(sizeof(InCmd),DEC); ExeCmd(InCmd); - /* - for (InCmdIndex++; InCmdIndex>0; InCmdIndex--) { - InCmd[InCmdIndex] = 0; - } - */ + for (InCmdIndex++; InCmdIndex>0; InCmdIndex--) { + InCmd[InCmdIndex] = 0; + } InCmdIndex = 0; }