added echo for serial debugger and some more commands
This commit is contained in:
parent
e913ce6e1b
commit
8f494dfa05
@ -73,6 +73,7 @@ void Debug_Process()
|
|||||||
inputBuffer[inputCnt] = 0; // terminate the String
|
inputBuffer[inputCnt] = 0; // terminate the String
|
||||||
inputCnt = 0;
|
inputCnt = 0;
|
||||||
InputProcessed = CMD_COMPLETE;
|
InputProcessed = CMD_COMPLETE;
|
||||||
|
Serial.write(inputChar);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x1B: // Esc
|
case 0x1B: // Esc
|
||||||
@ -84,6 +85,7 @@ void Debug_Process()
|
|||||||
case 0x21 ... 0x7E: // it's a real letter or sign and not some control-chars
|
case 0x21 ... 0x7E: // it's a real letter or sign and not some control-chars
|
||||||
inputBuffer[inputCnt] = inputChar;
|
inputBuffer[inputCnt] = inputChar;
|
||||||
inputCnt++;
|
inputCnt++;
|
||||||
|
Serial.write(inputChar);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -117,6 +119,10 @@ void Debug_Process()
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (InputProcessed != IDLE)
|
||||||
|
Serial.print(">");
|
||||||
|
|
||||||
InputProcessed = IDLE;
|
InputProcessed = IDLE;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -152,7 +158,7 @@ void Debug_pushMessage(const char *format, ...)
|
|||||||
if ((DebuggerStatus[dbg_Serial] == enabled) || (DebuggerStatus[dbg_Webui] == enabled))
|
if ((DebuggerStatus[dbg_Serial] == enabled) || (DebuggerStatus[dbg_Webui] == enabled))
|
||||||
{
|
{
|
||||||
char buff[128]; // Buffer to hold the formatted message
|
char buff[128]; // Buffer to hold the formatted message
|
||||||
va_list arg; // Variable argument list for vsnprintf
|
va_list arg; // Variable argument list for vsnprintf
|
||||||
va_start(arg, format);
|
va_start(arg, format);
|
||||||
|
|
||||||
// Format the message and store it in the buffer
|
// Format the message and store it in the buffer
|
||||||
@ -257,6 +263,14 @@ void processCmdDebug(String command)
|
|||||||
MaintainDTC(DTC_FAKE_DTC_WARN, true, millis());
|
MaintainDTC(DTC_FAKE_DTC_WARN, true, millis());
|
||||||
else if (command == "dtc_info")
|
else if (command == "dtc_info")
|
||||||
MaintainDTC(DTC_FAKE_DTC_INFO, true, millis());
|
MaintainDTC(DTC_FAKE_DTC_INFO, true, millis());
|
||||||
|
else if (command == "notify_error")
|
||||||
|
Websocket_PushNotification("Debug Error Notification", error);
|
||||||
|
else if (command == "notify_warning")
|
||||||
|
Websocket_PushNotification("Debug Warning Notification", warning);
|
||||||
|
else if (command == "notify_success")
|
||||||
|
Websocket_PushNotification("Debug Success Notification", success);
|
||||||
|
else if (command == "notify_info")
|
||||||
|
Websocket_PushNotification("Debug Info Notification", info);
|
||||||
else
|
else
|
||||||
Debug_pushMessage("unknown Command\n");
|
Debug_pushMessage("unknown Command\n");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user