diff --git a/lib/cli/cli.cpp b/lib/cli/cli.cpp index c2078d83..0e0f101d 100644 --- a/lib/cli/cli.cpp +++ b/lib/cli/cli.cpp @@ -122,8 +122,9 @@ void wcli_stime(char *args, Stream *response) { } void wcli_stype_error(Stream *response) { - response->println("invalid UART sensor type! Choose one into 0-7:"); - for (int i = 0; i <= 7; i++) response->printf("%i\t%s\r\n", i, sensors.getSensorName((SENSORS)i)); + // SENSORS::SSCD30-1 is the seperator (see Sensors.hpp) + response->printf("invalid UART sensor type! Choose one into 0-%i:\r\n",SENSORS::SSCD30-1); + for (int i = 0; i <= SENSORS::SSCD30-1; i++) response->printf("%i\t%s\r\n", i, sensors.getSensorName((SENSORS)i)); } void wcli_stype(char *args, Stream *response) { @@ -134,7 +135,7 @@ void wcli_stype(char *args, Stream *response) { return; } int type = stype.toInt(); - if (type > 7 || type < 0) wcli_stype_error(response); + if (type > SENSORS::SSCD30-1 || type < 0) wcli_stype_error(response); // SENSORS::SSCD30-1 is the seperator (see Sensors.hpp) else { saveSensorType(type); response->printf("\nselected UART sensor model\t: %s\r\n", sensors.getSensorName((SENSORS)type)); diff --git a/platformio.ini b/platformio.ini index 5e7ab483..6f5524ba 100644 --- a/platformio.ini +++ b/platformio.ini @@ -45,7 +45,7 @@ build_flags = lib_deps = bblanchon/ArduinoJson @ 6.21.2 hpsaturn/EasyPreferences@^0.1.2 - ; hpsaturn/ESP32 Wifi CLI @ ^0.2.1 + hpsaturn/ESP32 Wifi CLI @ ^0.3.0 https://github.com/hpsaturn/esp32-wifi-cli.git#devel https://github.com/chrisjoyce911/esp32FOTA.git#2bbc9cb https://github.com/rlogiacco/CircularBuffer.git#f29cf01