Repository navigation
Honour RX_BOOSTED_GAIN default on non-SX126x radios - #3864
Open
AlexandrTyshchenko wants to merge 1 commit into
Open
AlexandrTyshchenko wants to merge 1 commit into
AlexandrTyshchenko wants to merge 1 commit into
Conversation
The rx_boosted_gain default was only set for USE_SX1262/USE_SX1268, so on LR1110/LR1121/LR2021 boards it stayed 0. begin() then applied it to the radio, turning off the boosted gain that the variant had just enabled in target.cpp via RX_BOOSTED_GAIN (or LR2021_RX_BOOSTED_GAIN in CustomLR2021::std_init()). Use those flags as the default for the other radios in the repeater, companion and room server. SX1262/SX1268 and radios without either flag are unchanged.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The default for
rx_boosted_gainis only set under#if defined(USE_SX1262) || defined(USE_SX1268)in the repeater, companion and room server constructors. On LR1110 / LR1121 / LR2021 boards it stays0, andbegin()then applies it withradio_driver.setRxBoostedGainMode(_prefs.rx_boosted_gain).So on boards whose variant sets
RX_BOOSTED_GAIN=true(T1000-E, ThinkNode M3/M4/M7/M9, Wio WM1110, Minew ME25LS01, Muzi Base Duo, Waveshare ESP32-S3 LR1121),target.cppenables boosted gain andbegin()turns it off again right away. A freshly flashed node reportsget radio.rxgain→off. The same happens toLR2021_RX_BOOSTED_GAINset inCustomLR2021::std_init().Change
Two
#elifbranches: when the radio is not SX1262/SX1268 and the variant definesRX_BOOSTED_GAIN(orLR2021_RX_BOOSTED_GAIN), use it as the default forrx_boosted_gain.Not changed
0.radio.rxgain(set radio.rxgain onor a fresh install picks up the new default).setRxBoostedGainMode(), so the radio stays astarget.cppset it;get radio.rxgainnow reportson, matching that.Testing
Built
t1000e_repeater,t1000e_room_server,t1000e_companion_radio_ble,Waveshare_S3_LR1121_repeater,wio-e5-mini_repeater,ProMicro_repeater,ProMicro_companion_radio_ble. Not tested on hardware.Open question: should LR radios without a flag default to
onlike SX126x? I left that unchanged.