Add runtime FEM control and fix full Companion boot

This commit is contained in:
mikecarper
2026-08-10 17:10:18 -07:00
parent f40615ab56
commit 968ca3363b
10 changed files with 162 additions and 28 deletions
@@ -1,6 +1,7 @@
#include <gtest/gtest.h>
#include <helpers/CLICommandUtils.h>
#include <helpers/WiFiPowerSave.h>
TEST(CLICommandUtils, NormalizesCapitalizedSetVerb) {
char command[] = "Set altpath 600000,0d2784,F8DADA";
@@ -291,6 +292,15 @@ TEST(CLICommandUtils, ValidatesStandaloneWiFiValues) {
EXPECT_FALSE(mesh::cli::parseStandaloneWiFiPowerSave("off", power_save));
}
TEST(CLICommandUtils, EnforcesWiFiSleepForBluetoothCoexistence) {
EXPECT_EQ(0, mesh::wifi::effectivePowerSave(0, true));
EXPECT_EQ(0, mesh::wifi::effectivePowerSave(1, true));
EXPECT_EQ(2, mesh::wifi::effectivePowerSave(2, true));
EXPECT_EQ(1, mesh::wifi::effectivePowerSave(1, false));
EXPECT_EQ(0, mesh::wifi::effectivePowerSave(99, true));
EXPECT_EQ(1, mesh::wifi::effectivePowerSave(99, false));
}
TEST(CLICommandUtils, MatchesDiscoverNeighborsWithoutPrefixCollisions) {
using mesh::cli::NoArgCommandMatch;