-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Factory Reset] Fix keeping settings (#4263) #4354
[Factory Reset] Fix keeping settings (#4263) #4354
Conversation
@@ -275,6 +275,10 @@ bool executeInternalCommand(command_case_data & data) | |||
COMMAND_CASE_R( "clearaccessblock", Command_AccessInfo_Clear, 0); // Network Command | |||
COMMAND_CASE_R( "clearpassword", Command_Settings_Password_Clear, 1); // Settings.h | |||
COMMAND_CASE_R( "clearrtcram", Command_RTC_Clear, 0); // RTC.h | |||
#ifdef ESP8266 | |||
COMMAND_CASE_R( "clearsdkwifi", Command_System_Erase_SDK_WiFiconfig, 0); // System.h | |||
COMMAND_CASE_R( "clearwifirfcall", Command_System_Erase_RFcal, 0); // System.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should that be clearwifirfcal
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep :)
Just tested it and "keep settings" still doesn’t work. As you can see in the screenshot, i select keep unit name and wifi. |
src/src/Helpers/Networking.cpp
Outdated
const bool hasCredentials = !user.isEmpty() && !pass.isEmpty(); | ||
|
||
if (user.length() && pass.length()) { | ||
if (hasCredentials) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we should support the case where an external entity provides a base64 hash to log in, that might not contain a colon. The hash is then usually stored in the password field, and should be passed as the single value to http.setAuthorization(pass.c_str())
.
Nope, it was a clean test device... |
|
||
fileName += concat(F("thermo"), static_cast<int>(event->TaskIndex + 1)); | ||
fileName += F(".dat"); | ||
const String fileName(strformat(F("thermo%d.dat"), static_cast<int>(event->TaskIndex + 1))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The static_cast<int>
was only added to avoid having an extra template generated... (not sure if that was effective though)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well taskindex_t is of type unsigned char (uint8_t) and those almost char types sometimes might be seen as char instead of integer type.
So I will leave this. It will not make the build larger, just an excuse not to change it :)
Reduce build size by stripping unused code, which is related to features which can be turned on or off during build.
Reduce build size by removing duplicate code in the factory reset code.
Also added some chart to show the ESP8266 partition layout on the sysinfo page, like was already done for ESP32.
Added commands to clear RF cal partition and SDK WiFi partition when WiFi performance is bad:
ClearSdkWifi
ClearWifiRFcal
See: #4263
See: #2746
See: #2226
See: #4355 (when tested by @roobbb )