Commit d06fa8ee authored by Alan's avatar Alan Committed by Me No Dev

Make scanNetworks return int16 (#1496) (#1514)

parent c63d746a
......@@ -54,7 +54,7 @@ void* WiFiScanClass::_scanResult = 0;
* @param show_hidden show hidden networks
* @return Number of discovered networks
*/
int8_t WiFiScanClass::scanNetworks(bool async, bool show_hidden, bool passive, uint32_t max_ms_per_chan)
int16_t WiFiScanClass::scanNetworks(bool async, bool show_hidden, bool passive, uint32_t max_ms_per_chan)
{
if(WiFiScanClass::_scanStarted) {
return WIFI_SCAN_RUNNING;
......@@ -89,7 +89,7 @@ int8_t WiFiScanClass::scanNetworks(bool async, bool show_hidden, bool passive, u
while(!(WiFiScanClass::_scanComplete)) {
delay(10);
}
return WiFiScanClass::_scanCount;
return (int16_t) WiFiScanClass::_scanCount;
} else {
return WIFI_SCAN_FAILED;
}
......
......@@ -31,7 +31,7 @@ class WiFiScanClass
public:
int8_t scanNetworks(bool async = false, bool show_hidden = false, bool passive = false, uint32_t max_ms_per_chan = 300);
int16_t scanNetworks(bool async = false, bool show_hidden = false, bool passive = false, uint32_t max_ms_per_chan = 300);
int8_t scanComplete();
void scanDelete();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment