Unify full firmware profiles and add dual USB logging

This commit is contained in:
mikecarper
2026-08-23 19:22:45 -07:00
parent 9ed9e9d746
commit 5362d36ac7
56 changed files with 1652 additions and 361 deletions
@@ -129,6 +129,38 @@ TEST(WebConfigBatch, SetupWiFiHandoffUsesBoundedConnectAndBriefFlushDelays) {
EXPECT_EQ(1000U, Batch::kSetupHandoffRebootConfirmMs);
}
TEST(WebConfigBatch, FullUnconfiguredSetupWindowIsAnAbsoluteThirtyMinutes) {
const uint32_t started = 1000;
EXPECT_EQ(30UL * 60UL * 1000UL, Batch::kFullSetupApWindowMs);
EXPECT_FALSE(Batch::unconfiguredSetupWindowExpired(
true, false, started + Batch::kFullSetupApWindowMs - 1, started,
Batch::kFullSetupApWindowMs));
EXPECT_TRUE(Batch::unconfiguredSetupWindowExpired(
true, false, started + Batch::kFullSetupApWindowMs, started,
Batch::kFullSetupApWindowMs));
// Saving any SSID converts the node to deployed behavior, which continues
// reconnecting and is not subject to the provisioning cutoff.
EXPECT_FALSE(Batch::unconfiguredSetupWindowExpired(
true, true, started + Batch::kFullSetupApWindowMs, started,
Batch::kFullSetupApWindowMs));
EXPECT_FALSE(Batch::unconfiguredSetupWindowExpired(
false, false, started + Batch::kFullSetupApWindowMs, started,
Batch::kFullSetupApWindowMs));
EXPECT_FALSE(Batch::unconfiguredSetupWindowExpired(
true, false, started + Batch::kFullSetupApWindowMs, started, 0));
}
TEST(WebConfigBatch, FullUnconfiguredSetupWindowSurvivesMillisRollover) {
const uint32_t started = std::numeric_limits<uint32_t>::max() - 1000;
EXPECT_FALSE(Batch::unconfiguredSetupWindowExpired(
true, false, started + Batch::kFullSetupApWindowMs - 1, started,
Batch::kFullSetupApWindowMs));
EXPECT_TRUE(Batch::unconfiguredSetupWindowExpired(
true, false, started + Batch::kFullSetupApWindowMs, started,
Batch::kFullSetupApWindowMs));
}
// --------------------------------------------------------------------------
// Result read
// --------------------------------------------------------------------------