Skip to content

Commit

Permalink
fixed some minor warnnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hpsaturn committed Oct 23, 2024
1 parent 57a71b1 commit 089f790
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/advanced/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void setup() {
wcli.add("sleep", &sleep, "\t\t<mode> <time> ESP32 sleep mode (deep/light)\r\n");
wcli.add("echo", &echo, "\t\t\"message\" Echo the msg. Parameter into quotes");
wcli.add("info", &info, "\t\tsystem status info");
wcli.add("setled", &setled, "\t<PIN> config the LED GPIO for blink");
wcli.add("setled", &setled, "\t<PIN> config the LED GPIO pin");
wcli.add("blink", &blink, "\t\t<times> <millis> LED blink x times each x millis");
wcli.add("reboot", &reboot, "\tperform a ESP32 reboot");

Expand Down
8 changes: 6 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; ESP32 Wifi CLI
; ESP32 Wifi CLI (nmcli)
; @hpsaturn
; Full guide and details: https://github.com/hpsaturn/esp32-wifi-cli#readme

Expand All @@ -18,9 +18,13 @@ build_flags =
-D SHELLMINATOR_BUFF_DIM=70
-D COMMANDER_MAX_COMMAND_SIZE=70
-D WCLI_MAX_CMDS=7 ; only for this example
-Wall
-Wextra
-Werror

lib_deps =
https://github.com/hpsaturn/Shellminator.git
https://github.com/hpsaturn/Commander-API.git#strcmp-fix
https://github.com/hpsaturn/Commander-API.git

board_build.partitions = min_spiffs.csv

Expand Down
2 changes: 1 addition & 1 deletion src/ESP32WifiCLI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void ESP32WifiCLI::printHelp() {
this->shell->printHelp();
}

String ESP32WifiCLI::getNetKeyName(int net) {
String ESP32WifiCLI::getNetKeyName(uint8_t net) {
if (net > 99) return "";
char key[11];
sprintf(key, "key_net%02d", net);
Expand Down
6 changes: 3 additions & 3 deletions src/ESP32WifiCLI.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#define RW_MODE false
#define RO_MODE true

#define ESP32WIFICLI_VERSION "0.3.1"
#define ESP32WIFICLI_REVISION 045
#define ESP32WIFICLI_VERSION "0.3.2"
#define ESP32WIFICLI_REVISION 046

#ifndef WCLI_MAX_CMDS
#define WCLI_MAX_CMDS 15 // user and public commands
Expand Down Expand Up @@ -110,7 +110,7 @@ class ESP32WifiCLI {
int size_ = 0;
int isize_ = 0;

String getNetKeyName(int net);
String getNetKeyName(uint8_t net);

ESP32WifiCLICallbacks* cb = nullptr;
};
Expand Down
1 change: 0 additions & 1 deletion src/parser_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ static int ParseEnableDisable(String args) {
Pair<String, String> operands = ParseCommand(args);
String param = operands.first();
param.toUpperCase();
bool enable;
if (param.equals("ENABLE"))
return 1;
else if (param.equals("DISABLE"))
Expand Down

0 comments on commit 089f790

Please sign in to comment.