Implement setting TX_GAIN_LORA for portduino#8501
Merged
thebentern merged 6 commits intomeshtastic:developfrom Jan 22, 2026
Merged
Implement setting TX_GAIN_LORA for portduino#8501thebentern merged 6 commits intomeshtastic:developfrom
thebentern merged 6 commits intomeshtastic:developfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request implements support for configuring TX_GAIN_LORA values through the portduino YAML configuration file, adding the ability to specify either a single gain value or an array of values for nonlinear power amplifiers. The implementation refactors the existing compile-time TX_GAIN_LORA handling to support runtime configuration on portduino platforms.
Key Changes:
- Added
num_pa_pointsandtx_gain_lora[]array to portduino configuration structure - Unified linear and nonlinear gain handling in RadioInterface to work with both compile-time (non-portduino) and runtime (portduino) configurations
- Added YAML parsing and serialization for the new TX_GAIN_LORA configuration field
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/platform/portduino/PortduinoGlue.h | Added struct members for storing TX_GAIN_LORA values and YAML serialization logic |
| src/platform/portduino/PortduinoGlue.cpp | Implemented YAML parsing for TX_GAIN_LORA configuration (single value or array) |
| src/mesh/RadioInterface.cpp | Refactored power limiting logic to support both compile-time and runtime TX_GAIN_LORA values |
| src/configuration.h | Added default NUM_PA_POINTS definition |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jp-bennett
approved these changes
Nov 17, 2025
Prondtoo
pushed a commit
to Prondtoo/meshtastic_fw
that referenced
this pull request
Jan 30, 2026
* Implement setting TX_GAIN_LORA for portduino * use std::size instead of sizeof --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Prondtoo
pushed a commit
to Prondtoo/meshtastic_fw
that referenced
this pull request
Jan 30, 2026
* Implement setting TX_GAIN_LORA for portduino * use std::size instead of sizeof --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
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.
I've implemented support for TX_GAIN_LORA in the portduino yaml config. Also refactors the code a little bit to support choosing linear/nonlinear gain at runtime for this.
Tested with this config:
🤝 Attestations