diff --git a/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp b/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp index 1df25be3e..fb23b35e8 100644 --- a/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp +++ b/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp @@ -254,7 +254,7 @@ void ESP8266WiFiGenericClass::_eventCallback(void* arg) * Return the current channel associated with the network * @return channel (1-13) */ -int32_t ESP8266WiFiGenericClass::channel(void) { +uint8_t ESP8266WiFiGenericClass::channel(void) { return wifi_get_channel(); } diff --git a/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.h b/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.h index b5f307aed..815c26b6d 100644 --- a/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.h +++ b/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.h @@ -74,7 +74,7 @@ class ESP8266WiFiGenericClass { WiFiEventHandler onSoftAPModeProbeRequestReceived(std::function); WiFiEventHandler onWiFiModeChange(std::function); - int32_t channel(void); + uint8_t channel(void); bool setSleepMode(WiFiSleepType_t type, uint8_t listenInterval = 0);