From 05306fcd1d4135acb6cabacd42aef60d51dd380a Mon Sep 17 00:00:00 2001 From: jirogit Date: Thu, 2 Apr 2026 21:18:34 -0700 Subject: [PATCH] fix: enable radio.rxgain CLI command for LR1110 (T1000-E) USE_LR1110 was missing from the preprocessor guard in CommonCLI.cpp, causing both get and set to fail silently on T1000-E: - get radio.rxgain returned the full radio config string (fell through to the memcmp("radio", 5) branch) - set radio.rxgain returned "unknown config" (no branch matched) Fix: add -D USE_LR1110 to variants/t1000-e/platformio.ini and include USE_LR1110 in the #if guard on both get and set branches. CustomLR1110Wrapper already implements setRxBoostedGainMode() and getRxBoostedGainMode() via the RadioLibWrapper virtual interface, so no radio-layer changes are required. Tested on T1000-E: get/set/persist all confirmed working. --- src/helpers/CommonCLI.cpp | 4 ++-- variants/t1000-e/platformio.ini | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helpers/CommonCLI.cpp b/src/helpers/CommonCLI.cpp index 47a2592bc4..d2398130a9 100644 --- a/src/helpers/CommonCLI.cpp +++ b/src/helpers/CommonCLI.cpp @@ -328,7 +328,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch 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) +#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 @@ -537,7 +537,7 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch _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) +#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"); diff --git a/variants/t1000-e/platformio.ini b/variants/t1000-e/platformio.ini index ac92930861..2b320ac3de 100644 --- a/variants/t1000-e/platformio.ini +++ b/variants/t1000-e/platformio.ini @@ -13,6 +13,7 @@ build_flags = ${nrf52_base.build_flags} -D USER_BTN_PRESSED=HIGH -D PIN_STATUS_LED=24 -D RADIO_CLASS=CustomLR1110 + -D USE_LR1110 -D WRAPPER_CLASS=CustomLR1110Wrapper -D LORA_TX_POWER=22 -D RF_SWITCH_TABLE