fix: expose radio.rxgain CLI to Companion firmware

Add get/set radio.rxgain commands to Companion's CLI rescue mode.
Previously only available on Repeater and Room Server via CommonCLI.
Noted as follow-up in PR #1653 by jbrazio.
This commit is contained in:
me 2026-04-05 00:26:33 -07:00
parent fb726e48c2
commit 0d642606b9

View file

@ -1934,9 +1934,20 @@ void MyMesh::checkCLIRescueCmd() {
_prefs.ble_pin = atoi(&config[4]);
savePrefs();
Serial.printf(" > pin is now %06d\n", _prefs.ble_pin);
} else if (memcmp(config, "radio.rxgain ", 13) == 0) {
_prefs.rx_boosted_gain = memcmp(&config[13], "on", 2) == 0;
savePrefs();
radio_driver.setRxBoostedGainMode(_prefs.rx_boosted_gain);
Serial.println(" > OK");
} else {
Serial.printf(" Error: unknown config: %s\n", config);
}
} else if (memcmp(cli_command, "get radio.rxgain", 16) == 0) {
Serial.printf(" > %s\n", _prefs.rx_boosted_gain ? "on" : "off");
} else if (strcmp(cli_command, "rebuild") == 0) {
bool success = _store->formatFileSystem();
if (success) {