mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +03:00
Only enable PINIOBOX task when needed
Previously the task was always enabled and there's no reason for it to be running if there are no boxID associations. Saves a few cycles by not running. But has a bigger effect on the scheduler by minimizing the number of active tasks when possible.
This commit is contained in:
parent
a2aa3f19f4
commit
f688227db6
14 changed files with 40 additions and 8 deletions
|
@ -24,22 +24,26 @@
|
|||
|
||||
#include "platform.h"
|
||||
|
||||
#include "rc_modes.h"
|
||||
|
||||
#include "common/bitarray.h"
|
||||
#include "common/maths.h"
|
||||
|
||||
#include "drivers/time.h"
|
||||
|
||||
#include "config/config.h"
|
||||
#include "config/feature.h"
|
||||
|
||||
#include "fc/rc_controls.h"
|
||||
|
||||
#include "io/piniobox.h"
|
||||
|
||||
#include "pg/pg.h"
|
||||
#include "pg/pg_ids.h"
|
||||
#include "pg/rx.h"
|
||||
|
||||
#include "config/config.h"
|
||||
#include "fc/rc_controls.h"
|
||||
|
||||
#include "rx/rx.h"
|
||||
|
||||
#include "rc_modes.h"
|
||||
|
||||
#define STICKY_MODE_BOOT_DELAY_US 5e6
|
||||
|
||||
boxBitmask_t rcModeActivationMask; // one bit per mode defined in boxId_e
|
||||
|
@ -249,4 +253,7 @@ void analyzeModeActivationConditions(void)
|
|||
activeMacArray[activeMacCount++] = i;
|
||||
}
|
||||
}
|
||||
#ifdef USE_PINIOBOX
|
||||
pinioBoxTaskControl();
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue