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

This commit is contained in:
Alan 2018-06-19 03:32:12 -05:00 committed by Me No Dev
parent c63d746a06
commit d06fa8ee70
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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();