Reinstate rangefinder task
This commit is contained in:
parent
0e7a4d6e11
commit
f788f062ea
|
@ -254,6 +254,13 @@ void fcTasksInit(void)
|
||||||
setTaskEnabled(TASK_ATTITUDE, true);
|
setTaskEnabled(TASK_ATTITUDE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef USE_RANGEFINDER
|
||||||
|
if (sensors(SENSOR_RANGEFINDER)) {
|
||||||
|
setTaskEnabled(TASK_RANGEFINDER, featureIsEnabled(FEATURE_RANGEFINDER));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
setTaskEnabled(TASK_RX, true);
|
setTaskEnabled(TASK_RX, true);
|
||||||
|
|
||||||
setTaskEnabled(TASK_DISPATCH, dispatchIsEnabled());
|
setTaskEnabled(TASK_DISPATCH, dispatchIsEnabled());
|
||||||
|
@ -597,4 +604,13 @@ cfTask_t cfTasks[TASK_COUNT] = {
|
||||||
.staticPriority = TASK_PRIORITY_IDLE
|
.staticPriority = TASK_PRIORITY_IDLE
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_RANGEFINDER
|
||||||
|
[TASK_RANGEFINDER] = {
|
||||||
|
.taskName = "RANGEFINDER",
|
||||||
|
.taskFunc = rangefinderUpdate,
|
||||||
|
.desiredPeriod = TASK_PERIOD_HZ(10),
|
||||||
|
.staticPriority = TASK_PRIORITY_IDLE
|
||||||
|
},
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue