[PR #1182] [CLOSED] Support callbacks when waiting on WiFi connection and when in AP mode #1724

Closed
opened 2026-02-28 02:12:47 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tzapu/WiFiManager/pull/1182
Author: @plutino
Created: 12/31/2020
Status: Closed

Base: masterHead: master


📝 Commits (3)

  • e7f5ece Refactor waitForConnectResult method to always use timeout.
  • dfcea02 Allow callback during WiFi connection wait.
  • b7dd349 Allow callback when waiting for new WiFi configurations

📊 Changes

2 files changed (+65 additions, -29 deletions)

View changed files

📝 WiFiManager.cpp (+55 -27)
📝 WiFiManager.h (+10 -2)

📄 Description

This PR adds 2 configurable callbacks to allow status light update. E.g., quick flashing during WiFi connection and slow flashing when the board is in AP mode waiting for WiFi configurations.

Two public methods are added:

  1. setConnectionWaitCallback().
    This function sets a callback that is invoked periodically when waiting for a WiFi connection. Two changes are made to support this:

    1. Don't use the blocking WiFi.waitForConnectResult(). Instead, setting the default connection timeout to 60 seconds, which is the same as the default timeout for WiFi.waitForConnectResult().
    2. Change all blocking delay calls to non-blocking while loop and time check. This allows the callback to be used for pin update.
  2. setConfigWaitCallback().
    This function sets a callback that is invoked periodically when the board is in AP mode waiting for a new WiFi configuration.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/tzapu/WiFiManager/pull/1182 **Author:** [@plutino](https://github.com/plutino) **Created:** 12/31/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (3) - [`e7f5ece`](https://github.com/tzapu/WiFiManager/commit/e7f5ece08d0b1e4ea2b58062c179f489a0197be6) Refactor waitForConnectResult method to always use timeout. - [`dfcea02`](https://github.com/tzapu/WiFiManager/commit/dfcea02c078fe93f9b479cbe436af5c35e1b87a5) Allow callback during WiFi connection wait. - [`b7dd349`](https://github.com/tzapu/WiFiManager/commit/b7dd349f8793417275053e7633e08664c9546fbe) Allow callback when waiting for new WiFi configurations ### 📊 Changes **2 files changed** (+65 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `WiFiManager.cpp` (+55 -27) 📝 `WiFiManager.h` (+10 -2) </details> ### 📄 Description This PR adds 2 configurable callbacks to allow status light update. E.g., quick flashing during WiFi connection and slow flashing when the board is in AP mode waiting for WiFi configurations. Two public methods are added: 1. `setConnectionWaitCallback()`. This function sets a callback that is invoked periodically when waiting for a WiFi connection. Two changes are made to support this: 1. Don't use the blocking `WiFi.waitForConnectResult()`. Instead, setting the default connection timeout to 60 seconds, which is the same as the default timeout for `WiFi.waitForConnectResult()`. 2. Change all blocking `delay` calls to non-blocking `while` loop and time check. This allows the callback to be used for pin update. 2. `setConfigWaitCallback()`. This function sets a callback that is invoked periodically when the board is in AP mode waiting for a new WiFi configuration. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 02:12:47 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1724
No description provided.