fix: enable radio.rxgain CLI command for LR1110 (T1000-E)#2235
Open
jirogit wants to merge 1 commit intomeshcore-dev:devfrom
Open
fix: enable radio.rxgain CLI command for LR1110 (T1000-E)#2235jirogit wants to merge 1 commit intomeshcore-dev:devfrom
jirogit wants to merge 1 commit intomeshcore-dev:devfrom
Conversation
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.
Author
|
This also partially addresses #2118. |
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
radio.rxgainget/set commands were broken on T1000-E (LR1110).The CLI branches in
CommonCLI.cppwere guarded by#if defined(USE_SX1262) || defined(USE_SX1268), butUSE_LR1110wasnot defined in the T1000-E build, so both branches were compiled out.
This caused two different failure modes:
get radio.rxgain→ returned the full radio config string (e.g.> 921.000,125.0,10,5) becausememcmp("radio", 5)matched thenext branch
set radio.rxgain on→ returnedunknown config: radio.rxgain onbecause no branch matched
Fix
-D USE_LR1110tovariants/t1000-e/platformio.iniUSE_LR1110to the#ifguard on both get and set branchesCustomLR1110Wrapperalready implementssetRxBoostedGainMode()andgetRxBoostedGainMode()via theRadioLibWrappervirtual interface —no radio-layer changes required.
Testing (T1000-E)
get radio.rxgain→> off✅set radio.rxgain on→OK✅get radio.rxgainafter reboot →> on✅