-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Add SPIFFS.unmount() for use in OTA.onEnd() #1657
Comments
Great stuff, thank you! Please feel free to close. |
@igrr once OTA finishes I'm assuming that SPIFFS already is unmounted and I'd need to wrap further writes into SPIFFS begin/end. Is this correct? |
I think you need to unmount SPIFFS before you start OTA, i.e. in ArduinoOTA onBegin handler or similar. |
If find that a bit confusing. Shouldn't- if SPIFFS is touched by OTA- the unmount be part of the default OTA code? Remounting is clear for the onEnd handler, but unmounting? |
I see this the other way around. If you happen to use SPIFFS in the sketch, and you call |
Right. That makes perfect sense! The only thing is- up to now this wasn't even possible ;) So just wondering if this is worth a note or even a comment line in one the OTA examples (may this would be a good place: https://github.com/esp8266/Arduino/blob/master/libraries/ArduinoOTA/examples/BasicOTA/BasicOTA.ino) to make sure people understand this? Could do a PR for you! |
Use case: allow to store configuration from ram back to freshly updated SPIFFS. Avoid loss on configuration due to OTA wiping the filesystem config files.
Potential flow:
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: