Skip to content

Commit a072188

Browse files
committed
Make scanNetworks return int16 (#1496) (#1514)
1 parent 89ab113 commit a072188

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: libraries/WiFi/src/WiFiScan.cpp

+2-2
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_t WiFiScanClass::scanNetworks(bool async, bool show_hidden, bool passive, uint32_t max_ms_per_chan)
57+
int16_t WiFiScanClass::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
}

Diff for: libraries/WiFi/src/WiFiScan.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class WiFiScanClass
3131

3232
public:
3333

34-
int8_t scanNetworks(bool async = false, bool show_hidden = false, bool passive = false, uint32_t max_ms_per_chan = 300);
34+
int16_t scanNetworks(bool async = false, bool show_hidden = false, bool passive = false, uint32_t max_ms_per_chan = 300);
3535

3636
int8_t scanComplete();
3737
void scanDelete();

0 commit comments

Comments
 (0)