Greetings. The reference for P1 says the following:
“When adding new
retained
variables to an existing set ofretained
variables, it’s a good idea to add them after the existing variables. this ensures the existing retained data is still valid even with the new code.”
But after the next OTA update, only one variable was preserved. I added the retained variable to the end of the variable list. As stated in the reference, I did not use structures.
You can see the code for variables before and after OTA.
If I don’t add a new retained variable, then everything is retained. I cannot use magic bytes, since the backend does not save these variables I have nowhere to restore them. Thinking to use EEPROM before flashing. But first I want to know what my mistake is here.
Also there is a question: if i create backup retained variables, and then rename them, will they change during OTA update?