Closed jeffkowalski closed 8 months ago
I validated that the Web-Serial firmware flash code on https://sotamat.com/sotacat does overwrite the NVS settings and performs a full "factory reset". Since I don't see a use case for a factory reset while in the field, I suggest we remove the factory reset button. For people in-the-shack, they can use the firmware flash button with a USB cable which avoids accidents.
What might be better in the HTML is a "Save and Reboot" button, so that after you make your edits you can reboot with them applied.
Agreed?
Sure that's a reasonable way of erasing the NVS. I'll take out the factory reset button and code.
Added more instructions on the settings page
Tried to improve the visual style. Thank you ChatGPT.
I removed the default strings and made them blank so that the code doesn't try to connect to an SSID when it has the default values for "
Disabled entering deep sleep mode if the battery is more than 70% full. This will almost always be true when plugged in via USB.
I did not add the requested value checking.
Most important is danger of the hitting factory reset button without secondary confirmation, clearing wifi credentials.
Beyond that, I'd say the whole Settings page is ugly and could use a bunch of work to make it 1) more aesthetic, and 2) implement a variety of checks like a) are you sure you want to factory reset? and b) checks to ensure ssids are either empty or >= 2 and <= MAX_WIFI_SSID_SIZE chars and passwords are either empty or >= 8 and <= MAX_WIFI_PASS_SIZE chars. There are some rudiments of the latter already in the HTML, but no validation.