mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-18 08:51:43 +10:00
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:
@@ -16,8 +16,6 @@ void test_set_ap_static_ip_config() {
|
||||
// Set AP static IP
|
||||
wm.setAPStaticIPConfig(ip, gw, sn);
|
||||
|
||||
// Use non-blocking mode
|
||||
wm.setConfigPortalBlocking(false);
|
||||
wm.setConfigPortalTimeout(10);
|
||||
|
||||
// Start portal and verify IP is actually set
|
||||
@@ -72,11 +70,8 @@ void test_ap_static_ip_application() {
|
||||
|
||||
wm.setAPStaticIPConfig(customIP, customGW, customSN);
|
||||
|
||||
// Use non-blocking mode
|
||||
wm.setConfigPortalBlocking(false);
|
||||
wm.setConfigPortalTimeout(10);
|
||||
|
||||
// Note: In non-blocking mode, startConfigPortal() returns false even when successful
|
||||
wm.startConfigPortal("TestAP");
|
||||
TEST_ASSERT_TRUE(wm.getConfigPortalActive());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user