EdgeTX / edgetx

EdgeTX is the cutting edge open source firmware for your R/C radio
https://edgetx.org
GNU General Public License v2.0
1.57k stars 333 forks source link

Reset to default for Yaml - particuarly for B&W #1521

Closed pfeerick closed 1 year ago

pfeerick commented 2 years ago

Discussed in https://github.com/EdgeTX/edgetx/discussions/1514

Originally posted by **Denethor85** January 28, 2022 in the new version 2.6.0 there is no eeprom reset button, so how can I reset each setting to default? I tried reinstalling the firmware, wiping the SD card, but none of this seems to work .... Thanks

Essentially, we need to brink back the reset to factory option, and then have some way to prevent a import of EEPROM on the reset. Perhaps an empty file that indicates clean slate is wanted, and is then deleted?

stephenaa commented 2 years ago

Where would the UI of the "Reset to factory defaults" be?

pfeerick commented 2 years ago

In the past it has been at the bottom of the HARDWARE tab on B&W, and may be completely missing on colorlcd because saved to SD card instead (for all colorlcd radios AFAIK?). I believe at one point it was on the version screen on OTX, but perhaps just put it in the same place again, and also add for colorlcd?

image

stephenaa commented 2 years ago

Discussed in #1514

Originally posted by Denethor85 January 28, 2022 in the new version 2.6.0 there is no eeprom reset button, so how can I reset each setting to default? I tried reinstalling the firmware, wiping the SD card, but none of this seems to work ....

Thanks

Essentially, we need to brink back the reset to factory option, and then have some way to prevent a import of EEPROM on the reset. Perhaps an empty file that indicates clean slate is wanted, and is then deleted?

So the current behaviour is that the radio.yaml is generated from EEPROM when radio data is restored, correct?

raphaelcoeffic commented 2 years ago

Without checking, I believe empty files would effect exactly this.

gagarinlg commented 2 years ago

Without checking, I believe empty files would effect exactly this.

Is there a difference between an empty file and a partially filled file? With an incomplete file, I loose all the hardware settings regarding switch tyes etc.

stephenaa commented 2 years ago

It seems to me as if reverting to EEPROM settings are done in sdcard_yaml.cpp:loadRadioSettings() if no radio.yml exists, so maybe the block of code governed by the if at line 196 should include a check for the case that radio.yml exists, but has size==0. If radio_new.yml exists reading that should be attempted. "Factory reset" then would have to delete both files and call loadRadioSettings().

gagarinlg commented 1 year ago

2.9 does not support binary conversions anymore. This issue has been resolved by waiting long enough.