8000 delay / esp_delay: transparently manage recurrent scheduled functions by d-a-v · Pull Request #8802 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

delay / esp_delay: transparently manage recurrent scheduled functions #8802

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 10 commits into from
Jan 14, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update comments
  • Loading branch information
d-a-v committed Jan 14, 2023
commit 01240fc5673339f93362735436f49ed0bd74658c
7 changes: 3 additions & 4 deletions libraries/ESP8266WiFi/src/ESP8266WiFiMulti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ static void printWiFiStatus(wl_status_t status)
static wl_status_t waitWiFiConnect(uint32_t connectTimeoutMs)
{
wl_status_t status = WL_CONNECT_FAILED;
// The final argument, intvl_ms, to esp_delay determines
// the max ms interval at which status is checked
// Wait for WiFi to connect
// stop waiting upon status checked every 100ms or when timeout is reached
esp_delay(connectTimeoutMs,
[&status]() {
status = WiFi.status();
Expand Down Expand Up @@ -236,8 +236,7 @@ int8_t ESP8266WiFiMulti::startScan()
WiFi.scanNetworks(true);

// Wait for WiFi scan change or timeout
// The final argument, intvl_ms, to esp_delay determines
// the max ms interval at which status is checked
// stop waiting upon status checked every 100ms or when timeout is reached
esp_delay(WIFI_SCAN_TIMEOUT_MS,
[&scanResult]() {
scanResult = WiFi.scanComplete();
Expand Down
0