Skip to content

Commit f224a32

Browse files
committed
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.
1 parent ccda0a9 commit f224a32

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/helpers/CommonCLI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ void CommonCLI::handleSetCmd(uint32_t sender_timestamp, char* command, char* rep
547547
_prefs->disable_fwd = memcmp(&config[7], "off", 3) == 0;
548548
savePrefs();
549549
strcpy(reply, _prefs->disable_fwd ? "OK - repeat is now OFF" : "OK - repeat is now ON");
550-
#if defined(USE_SX1262) || defined(USE_SX1268)
550+
#if defined(USE_SX1262) || defined(USE_SX1268) || defined(USE_LR1110)
551551
} else if (memcmp(config, "radio.rxgain ", 13) == 0) {
552552
_prefs->rx_boosted_gain = memcmp(&config[13], "on", 2) == 0;
553553
strcpy(reply, "OK");
@@ -769,7 +769,7 @@ void CommonCLI::handleGetCmd(uint32_t sender_timestamp, char* command, char* rep
769769
sprintf(reply, "> %s", StrHelper::ftoa(_prefs->node_lat));
770770
} else if (memcmp(config, "lon", 3) == 0) {
771771
sprintf(reply, "> %s", StrHelper::ftoa(_prefs->node_lon));
772-
#if defined(USE_SX1262) || defined(USE_SX1268)
772+
#if defined(USE_SX1262) || defined(USE_SX1268) || defined(USE_LR1110)
773773
} else if (memcmp(config, "radio.rxgain", 12) == 0) {
774774
sprintf(reply, "> %s", _prefs->rx_boosted_gain ? "on" : "off");
775775
#endif

variants/t1000-e/platformio.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ build_flags = ${nrf52_base.build_flags}
1313
-D USER_BTN_PRESSED=HIGH
1414
-D PIN_STATUS_LED=24
1515
-D RADIO_CLASS=CustomLR1110
16+
-D USE_LR1110
1617
-D WRAPPER_CLASS=CustomLR1110Wrapper
1718
-D LORA_TX_POWER=22
1819
-D RF_SWITCH_TABLE

0 commit comments

Comments
 (0)