From 4b107a157eb01a28541098a10cfae37d8437c8c1 Mon Sep 17 00:00:00 2001 From: Jim Morris Date: Wed, 3 Oct 2018 18:49:15 +0100 Subject: [PATCH] ignore any line that starts with ok --- src/modules/utils/simpleshell/SimpleShell.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/utils/simpleshell/SimpleShell.cpp b/src/modules/utils/simpleshell/SimpleShell.cpp index b11f0317..67e70144 100644 --- a/src/modules/utils/simpleshell/SimpleShell.cpp +++ b/src/modules/utils/simpleshell/SimpleShell.cpp @@ -275,9 +275,9 @@ void SimpleShell::on_console_line_received( void *argument ) } else if (cmd == "fire") { // these are handled by Laser module - } else if (cmd == "ok") { - // probably an echo so reply ok - new_message.stream->printf("ok\n"); + } else if (cmd.substr(0, 2) == "ok") { + // probably an echo so ignore the whole line + //new_message.stream->printf("ok\n"); }else if(!parse_command(cmd.c_str(), possible_command, new_message.stream)) { new_message.stream->printf("error:Unsupported command - %s\n", cmd.c_str()); -- 2.20.1