Add WiFiManagerRequestArgs class and update saveParamsCallback to pass request arguments

- Created WiFiManagerRequestArgs nested class to encapsulate HTTP request arguments
- Updated setSaveParamsCallback to accept WiFiManagerRequestArgs by value
- Updated handleWifiSave() and handleParamSave() to build RequestArgs early
- Updated doParamSave() to accept and use RequestArgs for custom HTML params
- Updated test callbacks to match new signature
- All tests passing (43/43)
This commit is contained in:
2025-11-04 20:06:24 +10:00
parent 64c987a560
commit 4b1226bd05
3 changed files with 119 additions and 15 deletions
@@ -29,8 +29,10 @@ void pre_save_config_callback() {
pre_save_config_callback_fired = true;
}
void save_params_callback() {
void save_params_callback(WiFiManager::WiFiManagerRequestArgs requestArgs) {
save_params_callback_fired = true;
// Test that we can access request args
(void)requestArgs; // Suppress unused variable warning
}
void pre_save_params_callback() {