Remove blocking config portal mode and refactor API

- Remove setConfigPortalBlocking() API and _configPortalIsBlocking member variable
- Remove blocking while(1) loop from startConfigPortal()
- Change startConfigPortal() return type from boolean to void
- Change stopConfigPortal() return type from bool to void
- Make stopConfigPortal() immediately shutdown portal (call shutdownConfigPortal() directly)
- Remove unused portalAbortResult and portalTimeoutResult variables
- Update all comments to remove blocking mode references
- Simplify debug messages (remove 'non-blocking' references)
- Update tests to remove setConfigPortalBlocking() calls
- All 43 tests passing

The config portal is now always non-blocking, requiring users to call
process() periodically in their main loop. This aligns with the async
web server architecture and simplifies the API.
This commit is contained in:
2025-11-05 20:49:22 +10:00
parent d533f4d754
commit b94f34f06a
6 changed files with 29 additions and 147 deletions
@@ -8,8 +8,6 @@ void test_nonblocking_process() {
WiFiManager wm;
// Enable non-blocking mode
wm.setConfigPortalBlocking(false);
wm.setConfigPortalTimeout(10);
wm.startConfigPortal("TestAP");
@@ -46,8 +44,6 @@ void test_client_check_setters() {
wm.setAPClientCheck(true);
wm.setAPClientCheck(false);
// Use non-blocking mode
wm.setConfigPortalBlocking(false);
wm.setConfigPortalTimeout(10);
// Start portal and verify it works with client check settings
@@ -74,7 +70,6 @@ void test_nonblocking_timeout_behavior() {
WiFiManager wm;
wm.setConfigPortalBlocking(false);
wm.setConfigPortalTimeout(2); // 2 second timeout
wm.startConfigPortal("TestAP");