-
-
Notifications
You must be signed in to change notification settings - Fork 455
fix(afhds3): incorrect identification of module for RF power adjustment #6886
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: main
Are you sure you want to change the base?
Conversation
radio/src/pulses/afhds3.cpp
Outdated
| return; | ||
| } | ||
| else if( EXTERNAL == module_index ) | ||
| else if( 1 == module_index ) |
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.
use EXTERNAL_MODULE here
using just numbers is not OK
radio/src/pulses/afhds3.cpp
Outdated
| setState(ModuleState::STATE_NOT_READY); | ||
| } | ||
| else if( !RFCurrentPower && INTERNAL==module_index ) | ||
| else if( !RFCurrentPower && 0==module_index ) |
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.
use INTERNAL_MODULE here
using just numbers is not OK
|
@sneone Current problem is quite a lot of hardcoding with AFHDS3 capabilities, it is better to figure out a way to eliminate all these hardcoding by capability auto detection. Please feel free to discuss with me about this. |
…into pa01_rfpower_pr
Okay, we're discussing it ourselves, and we'll ask you for specific repair details. |
|
@sneone For this PR, you just follow what @gagarinlg suggests. In EdgeTX, we do not accept magic numbers in source code. Please use proper definition / enum instead. |
Fixed a bug in the FS RF power adjustment.