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; ...@@ -54,7 +54,7 @@ void* WiFiScanClass::_scanResult = 0;
* @param show_hidden show hidden networks * @param show_hidden show hidden networks
* @return Number of discovered 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) { if(WiFiScanClass::_scanStarted) {
return WIFI_SCAN_RUNNING; return WIFI_SCAN_RUNNING;
...@@ -89,7 +89,7 @@ int8_t WiFiScanClass::scanNetworks(bool async, bool show_hidden, bool passive, u ...@@ -89,7 +89,7 @@ int8_t WiFiScanClass::scanNetworks(bool async, bool show_hidden, bool passive, u
while(!(WiFiScanClass::_scanComplete)) { while(!(WiFiScanClass::_scanComplete)) {
delay(10); delay(10);
} }
return WiFiScanClass::_scanCount; return (int16_t) WiFiScanClass::_scanCount;
} else { } else {
return WIFI_SCAN_FAILED; return WIFI_SCAN_FAILED;
} }
......
...@@ -31,7 +31,7 @@ class WiFiScanClass ...@@ -31,7 +31,7 @@ class WiFiScanClass
public: 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(); int8_t scanComplete();
void scanDelete(); 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