Skip to content

Commit d06fa8e

Browse files
theproxyme-no-dev
authored andcommitted
Make scanNetworks return int16 (espressif#1496) (espressif#1514)
1 parent c63d746 commit d06fa8e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎libraries/WiFi/src/WiFiScan.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void* WiFiScanClass::_scanResult = 0;
5454
* @param show_hidden show hidden networks
5555
* @return Number of discovered networks
5656
*/
57-
int8_tWiFiScanClass::scanNetworks(bool async, bool show_hidden, bool passive, uint32_t max_ms_per_chan)
57+
int16_tWiFiScanClass::scanNetworks(bool async, bool show_hidden, bool passive, uint32_t max_ms_per_chan)
5858
{
5959
if(WiFiScanClass::_scanStarted){
6060
return WIFI_SCAN_RUNNING;
@@ -89,7 +89,7 @@ int8_t WiFiScanClass::scanNetworks(bool async, bool show_hidden, bool passive, u
8989
while(!(WiFiScanClass::_scanComplete)){
9090
delay(10);
9191
}
92-
return WiFiScanClass::_scanCount;
92+
return(int16_t) WiFiScanClass::_scanCount;
9393
} else{
9494
return WIFI_SCAN_FAILED;
9595
}

‎libraries/WiFi/src/WiFiScan.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class WiFiScanClass
3131

3232
public:
3333

34-
int8_tscanNetworks(bool async = false, bool show_hidden = false, bool passive = false, uint32_t max_ms_per_chan = 300);
34+
int16_tscanNetworks(bool async = false, bool show_hidden = false, bool passive = false, uint32_t max_ms_per_chan = 300);
3535

3636
int8_tscanComplete();
3737
voidscanDelete();

0 commit comments

Comments
(0)