pager: fix LR1121 TX power default and RX-boosted-gain gating

Boot TX power was left at a conservative 10dBm (Heltec V4's pattern) with
no way to raise it, unlike the T-Deck which boots straight at the chip's
real 22dBm ceiling. On hardware this was silently degrading outbound
range: adverts/DMs sent from the pager were unreliable while inbound
reception was fine, since the far node's own TX power was unaffected.
22dBm is confirmed as this chip's actual sub-GHz HP-PA ceiling via
RadioLib's LR1120::checkOutputPower() (LR1121 inherits it) and matches
trail-mate's own working config for this board.

Also widen the three RX-boosted-gain gates in MyMesh.cpp/DataStore.cpp
that only checked USE_SX1262/USE_SX1268 to include USE_LR1121 --
CustomLR1121Wrapper already implements setRxBoostedGainMode/
getRxBoostedGainMode, so the setting was silently a no-op for this radio.

Signed-off-by: Tesso M Costa <tesso.martins@gmail.com>
This commit is contained in:
Tesso M Costa
2026-07-07 15:50:07 -06:00
parent 05b24f01ad
commit b3c638842e
3 changed files with 15 additions and 7 deletions
+3 -3
View File
@@ -2537,7 +2537,7 @@ MyMesh::MyMesh(mesh::Radio &radio, mesh::RNG &rng, mesh::RTCClock &rtc, SimpleMe
_prefs.gps_enabled = 0; // GPS disabled by default
_prefs.gps_interval = 0; // No automatic GPS updates by default
//_prefs.rx_delay_base = 10.0f; enable once new algo fixed
#if defined(USE_SX1262) || defined(USE_SX1268)
#if defined(USE_SX1262) || defined(USE_SX1268) || defined(USE_LR1121)
#ifdef SX126X_RX_BOOSTED_GAIN
_prefs.rx_boosted_gain = SX126X_RX_BOOSTED_GAIN ? 1 : 0;
#else
@@ -2553,7 +2553,7 @@ void MyMesh::applyRadioFromPrefs() {
radio_driver.setParams(_prefs.freq, _prefs.bw, _prefs.sf, _prefs.cr);
radio_driver.radioRelease();
radio_driver.setTxPower(_prefs.tx_power_dbm);
#if defined(USE_SX1262) || defined(USE_SX1268)
#if defined(USE_SX1262) || defined(USE_SX1268) || defined(USE_LR1121)
_prefs.rx_boosted_gain = _prefs.rx_boosted_gain ? 1 : 0;
radio_driver.setRxBoostedGainMode(_prefs.rx_boosted_gain != 0);
MESH_DEBUG_PRINTLN("RX Boosted Gain Mode: %s",
@@ -3352,7 +3352,7 @@ void MyMesh::handleCmdFrame(size_t len) {
radio_driver.radioAcquire(); // hold off the RX drain task mid-sequence (no-op when off)
radio_driver.setParams(_prefs.freq, _prefs.bw, _prefs.sf, _prefs.cr);
#if defined(USE_SX1262) || defined(USE_SX1268) || defined(SX126X_RX_BOOSTED_GAIN)
#if defined(USE_SX1262) || defined(USE_SX1268) || defined(USE_LR1121) || defined(SX126X_RX_BOOSTED_GAIN)
radio_driver.setRxBoostedGainMode(_prefs.rx_boosted_gain != 0);
#endif
radio_driver.radioRelease();