feat: add automatic network failover

This commit is contained in:
agessaman committed 2026-09-01 21:18:22 -07:00
1 parent 03c0ad81fe
commit 366b086713
23 files changed
+600 -86

No files matched your search

@@ -113,6 +113,7 @@ TEST(MQTTPrefsSerializer, RoundTripsEveryGroupAndNumericSlotKeys) {
source.snmp_enabled = 1;
source.radio_watchdog_minutes = 120;
source.alert_enabled = 1;
source.network_setup_complete = 1;
strcpy(source.alert_psk_hex, "0123456789abcdef0123456789abcdef");
strcpy(source.alert_hashtag, "#ops");
strcpy(source.alert_region, "PNW");
@@ -137,6 +138,19 @@ TEST(MQTTPrefsSerializer, RoundTripsEveryGroupAndNumericSlotKeys) {
EXPECT_EQ(0x8001, loaded.mqtt_slot_packet_filter[5]);
EXPECT_EQ(MQTT_NEIGHBORS_MAX_INTERVAL_MS, loaded.mqtt_neighbors_interval);
EXPECT_STREQ("PNW", loaded.alert_region);
EXPECT_EQ(1, loaded.network_setup_complete);
}
TEST(MQTTPrefsSerializer, NetworkOnboardingSupportsWifiAndEthernetOnlyInstalls) {
MQTTPrefs prefs = defaults();
EXPECT_FALSE(mqttNetworkSetupComplete(&prefs));
strcpy(prefs.wifi_ssid, "existing-install");
EXPECT_TRUE(mqttNetworkSetupComplete(&prefs));
prefs.wifi_ssid[0] = 0;
prefs.network_setup_complete = 1;
EXPECT_TRUE(mqttNetworkSetupComplete(&prefs));
}
TEST(MQTTPrefsSerializer, MissingOptionalKeysKeepDefaults) {