1
0
Fork 0
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:
Bruce Luckcuck 2019-02-04 21:07:56 -05:00
parent 8c78ac507b
commit 42af168854
11 changed files with 65 additions and 14 deletions

View file

@ -392,5 +392,6 @@ int32_t getRcStickDeflection(int32_t axis, uint16_t midrc) {
void rcControlsInit(void)
{
analyzeModeActivationConditions();
isUsingSticksToArm = !isModeActivationConditionPresent(BOXARM);
}