mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
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:
parent
fb726e48c2
commit
0d642606b9
1 changed files with 11 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue