This commit is contained in:
MichaelDvP
2024-10-14 13:13:32 +02:00
69 changed files with 1696 additions and 721 deletions

View File

@@ -1698,7 +1698,7 @@ void EMSESP::loop() {
static bool show_prompt = true;
// user has to ctrl-c to create a serial console stream, exit command will close it
// user has to CTRL-D to create a serial console stream, exit command will close it
// this saves around 2kb of heap memory
if (shell_) {
if (!shell_->running()) {
@@ -1715,9 +1715,11 @@ void EMSESP::loop() {
int c = serial_console_.read();
if (c != -1) {
show_prompt = true;
Serial.println(c);
}
// https://daleswanson.org/ascii.htm#:~:text=0
if (c == '\x03') {
// CTRL-D to open
if (c == '\x04') {
start_serial_console();
}
}
@@ -1738,7 +1740,7 @@ void EMSESP::start_serial_console() {
void EMSESP::shell_prompt() {
#ifndef EMSESP_STANDALONE
serial_console_.println();
serial_console_.printf("EMS-ESP %s: press CTRL-C to activate this serial console", EMSESP_APP_VERSION);
serial_console_.printf("EMS-ESP %s: press CTRL-D to activate this serial console", EMSESP_APP_VERSION);
serial_console_.println();
#endif
}