Add an option to completely reset a MobiFlight board to Arduino stock state
The desired state is:
- Erased EEPROM
- Upload Blink Sketch
[Issue created by DocMoebiuz: 2017-02-19] [Last updated on bitbucket: 2020-12-27]
Same like #566 ??
@pizman no it is not the same. The board will be reset completely to stock, not only the eeprom cleared and restored. The reset scenario is for the case when the config is corrupted. I think for the user it is OK to reset and then reupload the firmware.
The original requirement was:
- Upload EEPROM sketch, to erase EEPROM
- Upload Blink sketch, to have the default behavior, because the boards come with blink installed Also one benefit of the blink sketch is that you don't write to the eeprom every time the boards restarts.
@elral - I was thinking of having this combined as a custom sketch, instead of uploading two, simply clear the eeprom and then have it blink. So that not on every restart the board gets cleared.
Maybe reading the first byte and
- if there is something, then clear everything, move to blink
- if there is nothing, then just move on to the blink loop.
Should be an ease to extend my EEPROM clear sketch with the blink sequence. I am only unsure if checking the first byte of the EEPROM is sufficient or if there are some cases where this could be fail.
I can prepare this EEPROM clear in a separate repo and tansfer it after we have checked it.