davetcc / tcMenu

Menu library for Arduino, mbed and ESP with designer UI and remote control capabilities.
https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/
Apache License 2.0
275 stars 25 forks source link

saveMenuItem does not save the magic key by design #298

Closed luwenjin closed 1 year ago

luwenjin commented 1 year ago

How to reproduce:

  1. flash a new rom to a new MCU
  2. edit menu value, saveMenuItem + EEPROM.commit(), reset; the value of the menuItem is not saved
  3. run menuMgr.save();EEPROM.commit();, reset; the value of the menu is empty as before
  4. edit menu value, run the same saveMenuItem + EEPROM.commit() again, reset; the value is saved

I guess it's because saveMenuItem does't write magic to the EEPROM?