|
|
|
@ -571,13 +571,15 @@ void CommonCLI::handleSetCmd(uint32_t sender_timestamp, char* command, char* rep |
|
|
|
_prefs->disable_fwd = memcmp(&config[7], "off", 3) == 0; |
|
|
|
savePrefs(); |
|
|
|
strcpy(reply, _prefs->disable_fwd ? "OK - repeat is now OFF" : "OK - repeat is now ON"); |
|
|
|
#if defined(USE_SX1262) || defined(USE_SX1268) || defined(USE_LR1110) |
|
|
|
} else if (memcmp(config, "radio.rxgain ", 13) == 0) { |
|
|
|
_prefs->rx_boosted_gain = memcmp(&config[13], "on", 2) == 0; |
|
|
|
strcpy(reply, "OK"); |
|
|
|
bool enabled = memcmp(&config[13], "on", 2) == 0; |
|
|
|
_prefs->rx_boosted_gain = enabled; |
|
|
|
savePrefs(); |
|
|
|
_callbacks->setRxBoostedGain(_prefs->rx_boosted_gain); |
|
|
|
#endif |
|
|
|
if (_callbacks->setRxBoostedGain(enabled)) { |
|
|
|
strcpy(reply, "OK"); |
|
|
|
} else { |
|
|
|
strcpy(reply, "Error: unsupported"); |
|
|
|
} |
|
|
|
} else if (memcmp(config, "radio.fem.rxgain ", 17) == 0) { |
|
|
|
if (!_board->canControlLoRaFemLna()) { |
|
|
|
strcpy(reply, "Error: unsupported"); |
|
|
|
@ -835,10 +837,8 @@ void CommonCLI::handleGetCmd(uint32_t sender_timestamp, char* command, char* rep |
|
|
|
sprintf(reply, "> %s", StrHelper::ftoa(_prefs->node_lat)); |
|
|
|
} else if (memcmp(config, "lon", 3) == 0) { |
|
|
|
sprintf(reply, "> %s", StrHelper::ftoa(_prefs->node_lon)); |
|
|
|
#if defined(USE_SX1262) || defined(USE_SX1268) || defined(USE_LR1110) |
|
|
|
} else if (memcmp(config, "radio.rxgain", 12) == 0) { |
|
|
|
sprintf(reply, "> %s", _prefs->rx_boosted_gain ? "on" : "off"); |
|
|
|
#endif |
|
|
|
} else if (memcmp(config, "radio.fem.rxgain", 16) == 0) { |
|
|
|
if (!_board->canControlLoRaFemLna()) { |
|
|
|
strcpy(reply, "Error: unsupported"); |
|
|
|
|