mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +03:00
Optimize rc modes activation conditions processing
Analyze the rc modes activation conditions and only process configured entries. Previously the entire possible list was processed even though typically only a handful are configured. Reduces the RX task processing time by about 25% (~44us to ~33us) with an average setup of 3 modes configured (F405, SBUS). Processing time savings will diminish as the user configures more modes. But typically far fewer than the maximum of 20 will be configured.
This commit is contained in:
parent
8c78ac507b
commit
42af168854
11 changed files with 65 additions and 14 deletions
|
@ -392,5 +392,6 @@ int32_t getRcStickDeflection(int32_t axis, uint16_t midrc) {
|
|||
|
||||
void rcControlsInit(void)
|
||||
{
|
||||
analyzeModeActivationConditions();
|
||||
isUsingSticksToArm = !isModeActivationConditionPresent(BOXARM);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue