diff --git a/src/MyESP.cpp b/src/MyESP.cpp index 50a9270e7..dfd863f8f 100644 --- a/src/MyESP.cpp +++ b/src/MyESP.cpp @@ -1430,9 +1430,13 @@ void MyESP::_telnetHandle() { if (charsRead > 0) { charsRead = 0; // is static, so have to reset _suspendOutput = false; + /* if (_general_serial) { SerialAndTelnet.serialPrint('\n'); // force newline if in Serial } + */ + SerialAndTelnet.write('\n'); // force NL + _telnetCommand(_command); } break; diff --git a/src/ems-esp.cpp b/src/ems-esp.cpp index ff6510625..da6d62d5a 100644 --- a/src/ems-esp.cpp +++ b/src/ems-esp.cpp @@ -1554,7 +1554,7 @@ void TelnetCommandCallback(uint8_t wc, const char * commandLine) { } // send raw - if (strcmp(first_cmd, "send") == 0) { + if ((strcmp(first_cmd, "send") == 0) && (wc > 1)) { ems_sendRawTelegram((char *)&commandLine[5]); ok = true; } @@ -1567,7 +1567,7 @@ void TelnetCommandCallback(uint8_t wc, const char * commandLine) { // check for invalid command if (!ok) { - myDebug_P(PSTR("Unknown command. Use ? for help.")); + myDebug_P(PSTR("Unknown command or wrong number of arguments. Use ? for help.")); } } diff --git a/src/ems.cpp b/src/ems.cpp index 8439205bc..c4e1f1785 100644 --- a/src/ems.cpp +++ b/src/ems.cpp @@ -2547,7 +2547,7 @@ void ems_printDevices() { // print out the ones we recognized if (Devices.size() != 0) { - myDebug_P(PSTR("and from these %d were recognized as:"), Devices.size()); + myDebug_P(PSTR("and from those these %d were recognized as:"), Devices.size()); for (std::list<_Generic_Device>::iterator it = Devices.begin(); it != Devices.end(); it++) { myDebug_P(PSTR(" %s%s%s (DeviceID:0x%02X ProductID:%d Version:%s)"), COLOR_BOLD_ON, @@ -2558,9 +2558,14 @@ void ems_printDevices() { (it)->version); } - myDebug_P(PSTR("\nNote: if any devices are marked as 'unknown?' please report this as a GitHub issue so the EMS devices list can be " - "updated.\n")); + myDebug_P(PSTR("")); // newline + myDebug_P(PSTR("Note: if any devices are marked as 'unknown?' please report this as a GitHub issue so the EMS devices list can be " + "updated.")); + } else { + myDebug_P(PSTR("No devices detected.")); } + + myDebug_P(PSTR("")); // newline } /**