mirror of https://github.com/rusefi/rusefi-1.git
simplify confirmation (#2131)
This commit is contained in:
parent
792c145e75
commit
08e2e37b9f
|
@ -510,7 +510,6 @@ char *validateSecureLine(char *line) {
|
||||||
return line;
|
return line;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char confirmation[200];
|
|
||||||
static char handleBuffer[200];
|
static char handleBuffer[200];
|
||||||
|
|
||||||
static bool handleConsoleLineInternal(const char *commandLine, int lineLength) {
|
static bool handleConsoleLineInternal(const char *commandLine, int lineLength) {
|
||||||
|
@ -551,12 +550,6 @@ static bool handleConsoleLineInternal(const char *commandLine, int lineLength) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
|
||||||
static void sendOutConfirmation(const char *command, int length) {
|
|
||||||
scheduleMsg(logging, "%s%d", command, length);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function takes care of one command line once we have it
|
* @brief This function takes care of one command line once we have it
|
||||||
*/
|
*/
|
||||||
|
@ -573,23 +566,14 @@ void handleConsoleLine(char *line) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(confirmation, "confirmation_");
|
|
||||||
strcat(confirmation, line);
|
|
||||||
strcat(confirmation, ":");
|
|
||||||
|
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
|
||||||
sendOutConfirmation(confirmation, lineLength);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if EFI_SIMULATOR
|
|
||||||
printf("handleConsoleLine [%s]\r\n", line);
|
|
||||||
#endif /* EFI_SIMULATOR */
|
|
||||||
|
|
||||||
|
|
||||||
bool isKnownComman = handleConsoleLineInternal(line, lineLength);
|
bool isKnownComman = handleConsoleLineInternal(line, lineLength);
|
||||||
|
|
||||||
if (!isKnownComman) {
|
if (!isKnownComman) {
|
||||||
scheduleMsg(logging, "unknown [%s]", line);
|
scheduleMsg(logging, "unknown command [%s]", line);
|
||||||
helpCommand();
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||||
|
scheduleMsg(logging, "confirmation_%s:%d", line, lineLength);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue