mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user