New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always use flashed options after a new flash #2149
Always use flashed options after a new flash #2149
Conversation
7c0db87
to
45e2f5e
Compare
# Conflicts: # src/html/index.html # src/lib/OPTIONS/options.cpp
This is an interesting solution to the confusion people are having with the webui options overrides. However, in the interest smaller code and less RAM, isn't a 32-bit random integer as functionally effective as 16 bytes of random data? Someone calculate the odds of getting the exact same 32 bits of random twice in a row AND also having edited their config.
ConfusionBack to the confusion of the webui overrides, what's missing from this is information. The user is presented with a box with no other information, so of course they think they're editing the actual value and not overriding it. Under "Runtime Options" on the webui how about something like:
Additionally, the indicator of IssuesI'm testing this and when I override the UID, the value changes after reboot but is always says "Flashed" as the UID type. Also, should the "& Reboot" be removed from the Save & Reboot button? It only saves, not reboots. The reboot comes on the followup dialog. That's all I got for now because I gotta get on a callllll! |
@CapnBry I did most of the things you mentioned above. With the exception of the styling around the UID type. |
418ccf7
to
0c2664a
Compare
Thanks @CapnBry. I removed the panel around the descriptive text as you are right it takes up too much space. |
Great work guys, I'll give feedback as appropriate when I next update my TX firmware. This should definitely cut-down on the support requests and users being unable to bind after upgrading. |
When flashing a device, it should always use the options supplied in configurator.
When flashing we now generate a random string which is written to the option JSON object. If this is different to the one on the SPIFFS partition then we use the flashed one. This means a user can modify their settings in the web UI and the new discriminator string is written to the SPIFFS and will use the SPIFSS options until the device is flashed again.
Check the "device-id" when saving options and if it is different it will return an error telling the user they need to refresh.
Disables the "Save & Reboot" button until a config has been read from the device.
Also fixes airport settings not being done when using the binary_configurator (for cloudbuilds).
This required an upgrade to the base ESP8266 platform as there was a bug when serialising JSON to the SPIFFS filesystem! It would write the correct number of bytes, but the last few were 0xFF ?! The code change was required because we now check the device-id on options save.
Fixes #2121 and #2120
Test 1
Test 2