1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 01:05:27 +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:
Bruce Luckcuck 2020-04-09 19:40:18 -04:00
parent a2aa3f19f4
commit f688227db6
14 changed files with 40 additions and 8 deletions

View file

@ -1107,4 +1107,5 @@ extern "C" {
void updateRcRefreshRate(timeUs_t) {};
uint16_t getAverageSystemLoadPercent(void) { return 0; }
bool isMotorProtocolEnabled(void) { return true; }
void pinioBoxTaskControl(void) {}
}

View file

@ -598,4 +598,5 @@ bool areSticksActive(uint8_t stickPercentLimit) {
void beeperConfirmationBeeps(uint8_t beepCount) { UNUSED(beepCount); }
bool crashRecoveryModeActive(void) { return false; }
void pinioBoxTaskControl(void) {}
}

View file

@ -249,4 +249,5 @@ bool accGetAccumulationAverage(float *) { return false; }
void mixerSetThrottleAngleCorrection(int) {};
bool gpsRescueIsRunning(void) { return false; }
bool isFixedWing(void) { return false; }
void pinioBoxTaskControl(void) {}
}

View file

@ -396,5 +396,5 @@ bool isFlipOverAfterCrashActive(void) { return false; }
void ws2811LedStripEnable(void) { }
void setUsedLedCount(unsigned) { };
void pinioBoxTaskControl(void) {}
}

View file

@ -456,6 +456,7 @@ extern "C" {
void resetPPMDataReceivedState(void){ }
void failsafeOnValidDataReceived(void) { }
void failsafeOnValidDataFailed(void) { }
void pinioBoxTaskControl(void) { }
void rxPwmInit(rxRuntimeState_t *rxRuntimeState, rcReadRawDataFnPtr *callback)
{

View file

@ -655,4 +655,5 @@ void resetTryingToArm(void) {}
void setLedProfile(uint8_t profile) { UNUSED(profile); }
uint8_t getLedProfile(void) { return 0; }
void compassStartCalibration(void) {}
void pinioBoxTaskControl(void) {}
}

View file

@ -994,4 +994,5 @@ extern "C" {
bool cmsInMenu;
uint32_t resumeRefreshAt = 0;
int getArmingDisableFlags(void) {return 0;}
void pinioBoxTaskControl(void) {}
}

View file

@ -243,4 +243,6 @@ float pt1FilterApply(pt1Filter_t *filter, float input)
return 0.0;
}
void pinioBoxTaskControl(void) {}
}

View file

@ -254,4 +254,6 @@ extern "C" {
UNUSED(input);
return 0.0;
}
void pinioBoxTaskControl(void) {}
}

View file

@ -192,4 +192,5 @@ extern "C" {
void updateRcRefreshRate(timeUs_t) {};
uint16_t getAverageSystemLoadPercent(void) { return 0; }
bool isMotorProtocolEnabled(void) { return false; }
void pinioBoxTaskControl(void) {}
}