pr3y / Bruce

Predatory ESP32 Firmware
https://bruce.computer
GNU Affero General Public License v3.0
781 stars 95 forks source link

allow storing config.conf in littlefs and avoid EEPROM use + add RF settings #139

Closed eadmaster closed 2 months ago

eadmaster commented 3 months ago

if the SD card is missing store config.conf in littlefs, completely removing use of the EEPROM for settings. (bruce.conf would be a better name btw)

should be implemented here: https://github.com/pr3y/Bruce/blob/main/src/core/settings.cpp#L585

Also add a setting for the Rf module in use:

This setting will be used in rf.cpp to init and use the correct module.

Single-pinned modules have a fixed operating frequency, that could be added as another setting and stored in the generated .sub files.

CC1101 receive frequency could also be stored as a setting, or asked interactively via a dialog. (i prefer the former)

Related to: https://github.com/pr3y/Bruce/pull/135

eadmaster commented 3 months ago

if the SD card is missing store config.conf in littlefs, completely removing use of the EEPROM for settings.

@bmorcelli : is it ok if i proceed with this, or are there reasons to keep a copy of the settings in the EEPROM?

bmorcelli commented 3 months ago

with M5Launcher providing the ability to remap partitions, wuth 2 options that doesn't have SPIFFS (partition type o LittleFS), it is intersting to keep things saved on EEPROM.

Have a copy in LittleFS in intersting too, because there are some firmwares that erase this part of the memory (Volos Watch, is an example)

other thing that we must consider, is the existence of such partition, that caused this issue https://github.com/pr3y/Bruce/issues/142

eadmaster commented 3 months ago

2fix: i've reworked the menu here so that it will try to init the cc1101 module to validate the user selection.

However this only works on the 1st try. On the 2nd try the module is reported as connected even if it is not. It may be a bug of ELECHOUSE_cc1101.getCC1101() or something else related to the init function. If you have any ideas pls post here.

eadmaster commented 3 months ago

nevermind, i've just found it was an error in the menu logic, it's fixed now and i can send another pr..