Revert "Add two ways back into provisioning: RST press and repeated server failure"
This reverts commit d32236d832.
This commit is contained in:
@@ -286,30 +286,10 @@ void frame_client_run(const frame_config_t *cfg)
|
||||
* compounding flashing. */
|
||||
ESP_LOGW(TAG, "Tools server not reachable, retrying sooner");
|
||||
sleep_seconds = CONFIG_FRAME_RETRY_INTERVAL_S;
|
||||
bool give_up = frame_config_record_server_failure();
|
||||
if (have_display) {
|
||||
status_screen_show(cfg->sta_ssid, STATUS_OK, cfg->toolsserver, STATUS_FAILED);
|
||||
}
|
||||
if (give_up) {
|
||||
/* Unreachable for too many wakes in a row -- likely moved or
|
||||
* reconfigured. Clear the stored config and reboot rather than
|
||||
* calling wifi_provisioning_start() directly here: that would
|
||||
* mean initializing the display driver a second time in this
|
||||
* same session (frame_client_run already did once), which is
|
||||
* the same class of double-init bug hit earlier with WiFi.
|
||||
* The next boot's frame_config_load() will report "not
|
||||
* provisioned" and route through the existing, already-tested
|
||||
* provisioning path with a single, fresh epd_init(). */
|
||||
ESP_LOGW(TAG, "Server unreachable for %d consecutive wakes, falling back to provisioning",
|
||||
CONFIG_FRAME_REPROVISION_AFTER_FAILURES);
|
||||
frame_config_clear();
|
||||
if (have_display) {
|
||||
epd_sleep();
|
||||
}
|
||||
esp_restart();
|
||||
}
|
||||
} else {
|
||||
frame_config_reset_server_failures();
|
||||
if (first_connection && have_display) {
|
||||
status_screen_show(cfg->sta_ssid, STATUS_OK, cfg->toolsserver, STATUS_OK);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user