Comments (7)
I had the same problem. I also had not deep-dive the code.
from configmanager.
Hi,
The minor issue I have with ConfigManager is on a new setup the contents of the eeprom is filled into the the fields in the setup screen. I haven't looked at the code yet, but it would be better to have empty text boxes on the first load.
The system has no concept of "first load". If your EEPROM is zeroed when flashing, then the values will be zeroed out. To try and change behaviour for first load would just make things more complex, as we would need to keep track of the state of the device. If it was desired not to read config that had not yet been written, it would be possible to add config magic bytes. When reading, if the bytes are not seen, it would not bother reading the config. This would allow for "default" config to be set on startup.
Typing new values into the line does not get rid of the remainder of the line.
Could you explain this more, I dont understand the issue here. Are you talking in the browser?
Confirmation would be nice
The confirmation is the 204 response.
Thanks,
Nick
from configmanager.
I did an erase of all flash and I then got what is shown in the image above. If the contents of the EEPROM area is filled with FF (erased) would that not give you a concept of "first load".
When I entered the new values into the form, the entered data wrote into those character positions but the remainder of the line was still filled with the ? image. In the above form, I had to delete a lot of the characters there to get an empty line.
If this was meant to be just for myself then I wouldn't have a problem with the quirks. But whatever I develop, I want to be able to give this to 'normal' people.
from configmanager.
The issue here is that you are erasing with FF
and not 00
. With strings in C, they are 00
terminated, so if you erase with 00
it will auto terminate the string. I kinda assumed erasing with 00
was standard.
from configmanager.
When I start with a clean slate, select erase "all flash contents" in the menu, any not initialized location will have FF in it. When you perform an erase on a memory block the erased state is all ones, FF. When you write some data what is happening is the appropriate bits are made to be zeros.
With strings in C, they are 00 terminated,
Then should the structure be initialized with 00 ?
Anyway, while there can be improvements, this is a good starting point for me. Thanks
from configmanager.
@RudyFiero FWIW in the latest release there is a clearSettings
call which should (maybe) initialize the memory that is handled more consistently per this discussion
from configmanager.
Great! I will give it a try as soon as I can.
from configmanager.
Related Issues (20)
- Unable to save WiFi settings to EEPROM [esp32] HOT 3
- Saving char arrays in EEPROM HOT 2
- Delay restarting device to allow web server response
- ConfigManager::begin() changes value of int in struct HOT 22
- Metadata adding config values HOT 2
- reading and writing from struct config data HOT 2
- Compiler warning HOT 1
- CORS errors HOT 6
- How can I make it to auto reconnect? HOT 4
- not possible to save the value 0 via settings.html
- Issue using LittleFS HOT 1
- Compiling / version issue with ArduinoJson HOT 3
- settings endpoint will only return last saved value HOT 5
- image file (.jpg/.png) cannot be used in index.html HOT 3
- v3 tracking issue HOT 11
- Saving config with wrong type wipes EEPROM memory HOT 3
- ESP32 Wifi Sucks .. connects every two tries .. Workaround thoughts HOT 4
- Problems with with variables in the sketch HOT 9
- One little problem with one parameter HOT 5
- Is it possible to send a Webpage from ESP32 ? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from configmanager.