Skip to content

Conversation

@sneone
Copy link
Contributor

@sneone sneone commented Dec 19, 2025

Fixed a bug in the FS RF power adjustment.

return;
}
else if( EXTERNAL == module_index )
else if( 1 == module_index )
Copy link
Member

@gagarinlg gagarinlg Dec 19, 2025

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

setState(ModuleState::STATE_NOT_READY);
}
else if( !RFCurrentPower && INTERNAL==module_index )
else if( !RFCurrentPower && 0==module_index )
Copy link
Member

@gagarinlg gagarinlg Dec 19, 2025

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

@pfeerick pfeerick changed the title Fixed a bug in the FS RF power adjustment. fix(afhds3): incorrect identification of module for RF power adjustment Dec 19, 2025
@pfeerick pfeerick added the bug/regression ↩️ A new version of EdgeTX broke something label Dec 19, 2025
@pfeerick pfeerick added this to the 2.11.5 milestone Dec 19, 2025
@richardclli
Copy link
Collaborator

@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.

@sneone
Copy link
Contributor Author

sneone commented Dec 22, 2025

@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.

Okay, we're discussing it ourselves, and we'll ask you for specific repair details.

@richardclli
Copy link
Collaborator

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug/regression ↩️ A new version of EdgeTX broke something

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants