prampec / IotWebConf

ESP8266/ESP32 non-blocking WiFi/AP web configuration Arduino library
MIT License
523 stars 140 forks source link

Advanced setConfigSavedCallback - provide parameters classes changed #270

Open NilsRo opened 1 year ago

NilsRo commented 1 year ago

Hi,

to make the handling after saving changed parameters easier (e.g. to avoid the standard restart like done in the examples) it would be nice if all "changed" parameters can be provided to the callback. As the eeprom is at this step it is perhaps easy to add it.

This would make it easier to reload e.g. the MQTT client only of the MQTT server is changed which would not interfere with other components.

Something like: void configSaved(e.g. Array of params classes) { Serial.println("Configuration saved."); if ( contains MQTT server) { restartMQTT(); } // Not anymore ncessary: needReset = true; }