1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 15:25:36 +03:00

Change priorities for tasks

This commit is contained in:
borisbstyle 2016-03-01 21:49:37 +01:00
parent 98a1de2b70
commit 717290872c
3 changed files with 12 additions and 11 deletions

View file

@ -668,7 +668,12 @@ int main(void) {
setTaskEnabled(TASK_GYROPID, true);
setTaskEnabled(TASK_MOTOR, true);
rescheduleTask(TASK_MOTOR, constrain(lrintf((1.0f / masterConfig.motor_pwm_rate) * 1000000), 250, 3500));
if (feature(FEATURE_ONESHOT125)) {
rescheduleTask(TASK_MOTOR, constrain(lrintf((1.0f / masterConfig.motor_pwm_rate) * 1000000), 250, 3500));
} else {
rescheduleTask(TASK_MOTOR, 1000);
}
if(sensors(SENSOR_ACC)) {
setTaskEnabled(TASK_ACCEL, true);