Fix Companion device power saving

This commit is contained in:
mikecarper committed 2026-08-15 17:58:37 -07:00
1 parent 9161dfd7d5
commit 933697f65c
16 files changed
+1959 -1821

No files matched your search

@@ -50,6 +50,21 @@ public:
const std::string& text() const { return _text; }
};
TEST(CompanionNodePrefs, DevicePowerSavingIsIndependentFromRxps) {
CompanionNodePrefs prefs = {};
prefs.rx_powersaving_enabled = 1;
prefs.powersaving_enabled = 0;
EXPECT_EQ(1, prefs.rx_powersaving_enabled);
EXPECT_EQ(0, prefs.powersaving_enabled);
prefs.powersaving_enabled = 1;
prefs.rx_powersaving_enabled = 0;
EXPECT_EQ(0, prefs.rx_powersaving_enabled);
EXPECT_EQ(1, prefs.powersaving_enabled);
}
#if 0
// Re-enable test once we can SET fem_ values in companion
TEST(CompanionNodePrefs, RxGainSettingsRoundTripIndependently) {
@@ -10,6 +10,7 @@ TEST(WebConfigKeys, AllowsKnownScalarKeys) {
EXPECT_TRUE(wcIsAllowedSetKey("name"));
EXPECT_TRUE(wcIsAllowedSetKey("radio"));
EXPECT_TRUE(wcIsAllowedSetKey("radio.rxps"));
EXPECT_TRUE(wcIsAllowedSetKey("powersaving"));
EXPECT_TRUE(wcIsAllowedSetKey("repeat"));
EXPECT_TRUE(wcIsAllowedSetKey("wifi.ssid"));
EXPECT_TRUE(wcIsAllowedSetKey("mqtt.iata"));