Refactor WiFiManager: extract server and handlers into separate modules

- Move server lifecycle management to WiFiManagerServer
- Move HTTP handlers and rendering to WiFiManagerHandlers
- Move DEBUG_WM template definitions to WiFiManagerDebug
- Implement lazy initialization of server manager to save memory
- Add proper cleanup in destructor and on multiple createServer calls
- Update tests to use getServer() and getDNSServer() accessors
This commit is contained in:
2025-11-15 22:22:36 +10:00
parent 1788aa3c4a
commit 9cd5f62f9b
14 changed files with 1777 additions and 1753 deletions
@@ -76,8 +76,8 @@ void test_state_consistency_during_portal() {
// Verify state consistency
TEST_ASSERT_TRUE(wm.getConfigPortalActive());
TEST_ASSERT_NOT_NULL(wm.server);
TEST_ASSERT_NOT_NULL(wm.dnsServer);
TEST_ASSERT_NOT_NULL(wm.getServer());
TEST_ASSERT_NOT_NULL(wm.getDNSServer());
// Process multiple times
for (int i = 0; i < 10; i++) {