mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[PR #1182] [CLOSED] Support callbacks when waiting on WiFi connection and when in AP mode #1724
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#1724
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/tzapu/WiFiManager/pull/1182
Author: @plutino
Created: 12/31/2020
Status: ❌ Closed
Base:
master← Head:master📝 Commits (3)
e7f5eceRefactor waitForConnectResult method to always use timeout.dfcea02Allow callback during WiFi connection wait.b7dd349Allow 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:
setConnectionWaitCallback().This function sets a callback that is invoked periodically when waiting for a WiFi connection. Two changes are made to support this:
WiFi.waitForConnectResult(). Instead, setting the default connection timeout to 60 seconds, which is the same as the default timeout forWiFi.waitForConnectResult().delaycalls to non-blockingwhileloop and time check. This allows the callback to be used for pin update.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.