1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Adding onComplete event handler support for the asynchronous network scanning. (#2287)

This commit is contained in:
Sergey Anisimov
2016-07-18 12:30:41 +01:00
committed by Ivan Grokhotkov
parent f0e2c9f28b
commit 98fe5617eb
2 changed files with 17 additions and 1 deletions

View File

@ -35,6 +35,7 @@ class ESP8266WiFiScanClass {
public:
int8_t scanNetworks(bool async = false, bool show_hidden = false);
void scanNetworksAsync(std::function<void(int)> onComplete, bool show_hidden = false);
int8_t scanComplete();
void scanDelete();
@ -59,6 +60,8 @@ class ESP8266WiFiScanClass {
static size_t _scanCount;
static void* _scanResult;
static std::function<void(int)> _onComplete;
static void _scanDone(void* result, int status);
static void * _getScanInfoByIndex(int i);