Unify full firmware profiles and add dual USB logging

This commit is contained in:
mikecarper committed 2026-08-23 19:22:45 -07:00
1 parent b699e552ec
commit f2d4ffbb7e
56 files changed
+1652 -361

No files matched your search

+17
View File
@@ -45,6 +45,7 @@ static const uint32_t kRebootConfirmMs = 3000; // .cpp:784 first result-read
static const uint32_t kSetupWiFiConnectTimeoutMs = 20000;
static const uint32_t kSetupHandoffRebootConfirmMs = 1000;
static const uint32_t kStopWarnMs = 10000; // .h:95 STOP_WARN_MS
static const uint32_t kFullSetupApWindowMs = 30UL * 60UL * 1000UL;
// The batch lifecycle. A fresh POST moves Idle->Pending; the drainer moves
// Pending->Done; Done stays re-readable until the next POST claims the slot;
@@ -70,6 +71,22 @@ static inline bool deadlineReached(uint32_t now, uint32_t deadline) {
return (int32_t)(now - deadline) >= 0;
}
// FULL images expose an unconfigured setup AP for one bounded, boot-local
// window. Activity and connected stations do not extend it: until an SSID is
// saved the WiFi radio must go dark after 30 minutes. A reboot constructs a new
// WebConfigServer and therefore starts a new automatic window without
// persisting a timeout state. An explicit later `start webconfig` is still an
// operator override. timeout_ms == 0 keeps this policy disabled for profiles
// that retain the legacy idle-only behavior.
static inline bool unconfiguredSetupWindowExpired(bool setup_mode,
bool has_saved_ssid,
uint32_t now,
uint32_t setup_started_at,
uint32_t timeout_ms) {
return timeout_ms != 0 && setup_mode && !has_saved_ssid
&& elapsedMs(now, setup_started_at) >= timeout_ms;
}
// --------------------------------------------------------------------------
// POST accept classification (.cpp:637-718). Precedence, verbatim from the
// source: an in-flight/finished batch with the SAME reqid is an idempotent