Skip to content

Commit

Permalink
Merge pull request #280 from kike-canaries/air_gradient_drivers
Browse files Browse the repository at this point in the history
Air gradient drivers
  • Loading branch information
hpsaturn authored Sep 20, 2024
2 parents 0c30577 + f57b14e commit 76fd5b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lib/cli/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 76fd5b2

Please sign in to comment.