From f019f7eb77754b9c809402038d4220fd5bb7f150 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Tue, 1 Dec 2020 12:23:26 +0100 Subject: [PATCH] device configuration prepared --- cube/User/Src/cmdHandler.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cube/User/Src/cmdHandler.c b/cube/User/Src/cmdHandler.c index 5df35f3..c631bc2 100644 --- a/cube/User/Src/cmdHandler.c +++ b/cube/User/Src/cmdHandler.c @@ -240,6 +240,7 @@ static int8_t cmdExecuteCommand(uint8_t *cmdLine, bool resetSpecialModes) { const static char GOODBYE_MSG[] = "Good bye\n\r"; const static char OK_MSG[] = "OK\n\r"; const static char FAILED_MSG[] = "Failed\n\r"; + const static char UNKNOWN_COMMAND[] = "Unknown command\n\r"; uint8_t *messageToSend = NULL; static bool adminMode = false; @@ -311,6 +312,7 @@ static int8_t cmdExecuteCommand(uint8_t *cmdLine, bool resetSpecialModes) { while (true) { cmd_t command = commands[cmdIdx]; if (0 == strcmp("END_OF_CMDS", command.name)) { + messageToSend = (uint8_t*) UNKNOWN_COMMAND; break; } if (0 == strcmp(cmd, command.name)) {