devicename in prompt

This commit is contained in:
Wolfgang Hottgenroth 2020-12-11 12:54:40 +01:00
parent 4726d845b3
commit 1285ebd562
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F

View File

@ -173,9 +173,9 @@ static void cmdHandlerEngine(void *handle) {
"or quit to close the connection.\n\r"; "or quit to close the connection.\n\r";
static char *prompt; static char *prompt;
static char defaultPrompt[] = "MBGW3 > "; static char defaultPrompt[] = " > ";
static char adminPrompt[] = "MBGW3 (admin) # "; static char adminPrompt[] = " (admin) # ";
static char configPrompt[] = "MBGW3 (config) $ "; static char configPrompt[] = " (config) $ ";
int8_t res = 0; 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); coloredMsg(LOG_YELLOW, true, "ch che sockState is 0x%02x when trying to send promt", sockState);
state = CH_DISCONNECT; state = CH_DISCONNECT;
} else { } else {
resultSend = send(CMD_SOCK, (uint8_t*)prompt, strlen(prompt)); sendFormatString("%s %s", getConfig()->deviceName, prompt);
coloredMsg(LOG_YELLOW, false, "ch che sent prompt %s, send returns 0x%02x", prompt, resultSend); coloredMsg(LOG_YELLOW, false, "ch che sent prompt %s %s", getConfig()->deviceName, prompt);
state = CH_RECEIVE; state = CH_RECEIVE;
} }
break; break;