-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kentaylor Fork/ConfigOnSwitchFS: Values are not saved on SPIFFS #249
Comments
Yes, it
when the
In this example writeConfigFile() is called after WiFiManager finishes. There is an alternative of using a call back function so that writeConfigFile() will be called as soon as the save button is pressed. The example was contributed by @battika and I can see why he has not made writeConfigFile() a callback. If he did it would require the WiFiManagerParameter declarations to be global but because he uses values in the declaration that are read from spiffs he can't do that. So the alternatives I see are:
Perhaps others can provide more insight. I am reluctant to do 3 because I'm thinking to remove this functionality from the https://github.com/kentaylor/WiFiManager/ version and have suggested it be removed from the @tzapu version also. I've had no feedback on that suggestion so would appreciate your views. I'm a fan of the @SensorsIot videos and guess the interest in WiFiManager is related to video 78. I'd suggest looking at the @Squix idea of having sketches automatically deployed to devices in the field simply by committing source to GitHub. I'm guessing @Squix has a Swiss accent too. An essential component of that model is something like the IOT Configurator which would also be a useful addition to your current model. |
Thanks for your answer! I also like your library and it is currently part of the IOTappstore infrastructure. typedef struct { void writeConfig() { for (unsigned int t = 0; t < sizeof(config); t++) EEPROM.write(t, ((char)&config + t)); // could be replaces by EEPROM. put if stable } else { |
I use the original example and enter different values in fields. Then I save and check again. All changes are there as expected. Then, I reboot. After this reboot, the old values are there. The writeConfigFile() is not called during when I press the "save" button. It is only saved if I press "Exit". This is somehow misleading. Save for me means, it is persisted...
The text was updated successfully, but these errors were encountered: