-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Implement setting TX_GAIN_LORA for portduino #8501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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