Echo back invalid commands

This was really helpful when debugging dodgy
serial connections - and shouldn't hurt anything
in normal operations.
This commit is contained in:
Richard Bowman 2023-02-22 12:07:47 +00:00
parent 3997d66cde
commit c38c0b7195

View file

@ -74,7 +74,9 @@ void handle_command(String received_command)
} }
#ifdef HELP #ifdef HELP
comPort->println(F("Type 'help' for a list of commands.")); comPort->print(F("Command not recognised: '"));
comPort->print(received_command);
comPort->println(F("', Type 'help' for a list of commands."));
#else #else
comPort->println(F("Invalid command")); comPort->println(F("Invalid command"));
#endif #endif