From 1285ebd5621013413a9d502182d638c8873eb963 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Fri, 11 Dec 2020 12:54:40 +0100 Subject: [PATCH] devicename in prompt --- cube/User/Src/cmdHandler.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cube/User/Src/cmdHandler.c b/cube/User/Src/cmdHandler.c index 6957ca9..e0f6736 100644 --- a/cube/User/Src/cmdHandler.c +++ b/cube/User/Src/cmdHandler.c @@ -173,9 +173,9 @@ static void cmdHandlerEngine(void *handle) { "or quit to close the connection.\n\r"; static char *prompt; - static char defaultPrompt[] = "MBGW3 > "; - static char adminPrompt[] = "MBGW3 (admin) # "; - static char configPrompt[] = "MBGW3 (config) $ "; + static char defaultPrompt[] = " > "; + static char adminPrompt[] = " (admin) # "; + static char configPrompt[] = " (config) $ "; int8_t res = 0; @@ -251,8 +251,8 @@ static void cmdHandlerEngine(void *handle) { coloredMsg(LOG_YELLOW, true, "ch che sockState is 0x%02x when trying to send promt", sockState); state = CH_DISCONNECT; } else { - resultSend = send(CMD_SOCK, (uint8_t*)prompt, strlen(prompt)); - coloredMsg(LOG_YELLOW, false, "ch che sent prompt %s, send returns 0x%02x", prompt, resultSend); + sendFormatString("%s %s", getConfig()->deviceName, prompt); + coloredMsg(LOG_YELLOW, false, "ch che sent prompt %s %s", getConfig()->deviceName, prompt); state = CH_RECEIVE; } break;