Skip to content

Make scanNetworks return int16 (#1496) #1514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libraries/WiFi/src/WiFiScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/WiFi/src/WiFiScan.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down