You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@edumeneses
Would it be possible to have a public method for saving variables to the esp32 spiffs filesystem? It would be nice for saving calibration variables that might update during runtime and need to be maintained in between sessions.
puara.saveVarNumber(std::string variable_name, int value)
puara.saveVarText(std::string variable_name, std::string value)
Basically, just a save version of the getVarNumber and getVarText. From what I can tell most of the functionality is there already for the webpage. I can implement it myself if it is simple enough just need some pointers.
The text was updated successfully, but these errors were encountered:
It seems the method write_settings_json is already public. The problem is that the variables vector, that stores the settingsVariables structs is private.
We can:
make the settingsVariables struct public, and then
create a small function that inserts new items into the variables vector.
That would allow emplacing a new settingsVariables instance into the variables vector, and then call write_settings_json to save the changes into the settings.jsonfile.
On second thought, we might also want to remove entries.
We can make intead:
a function with std::string name, std::string type, std::string textValue, and double numberValue as arguments to create an item into the variables vector
a function with std::string name as an argument, that removes matches from the variables vector
In this case, we probably need a check for duplicates on the variables vector, as it might break cJSON when deserializing the file.
@edumeneses
Would it be possible to have a public method for saving variables to the esp32 spiffs filesystem? It would be nice for saving calibration variables that might update during runtime and need to be maintained in between sessions.
Basically, just a save version of the
getVarNumber
andgetVarText
. From what I can tell most of the functionality is there already for the webpage. I can implement it myself if it is simple enough just need some pointers.The text was updated successfully, but these errors were encountered: