mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Update external defines for ALT / POS HOLD (#14069)
* Update external defines for ALT / POS HOLD * Update unit test define
This commit is contained in:
parent
b5ab83b3bc
commit
2426f43502
21 changed files with 39 additions and 39 deletions
|
@ -378,11 +378,11 @@ task_attribute_t task_attributes[TASK_COUNT] = {
|
|||
[TASK_GPS_RESCUE] = DEFINE_TASK("GPS_RESCUE", NULL, NULL, taskGpsRescue, TASK_PERIOD_HZ(TASK_GPS_RESCUE_RATE_HZ), TASK_PRIORITY_MEDIUM),
|
||||
#endif
|
||||
|
||||
#ifdef USE_ALT_HOLD_MODE
|
||||
#ifdef USE_ALTITUDE_HOLD
|
||||
[TASK_ALTHOLD] = DEFINE_TASK("ALTHOLD", NULL, NULL, updateAltHold, TASK_PERIOD_HZ(ALTHOLD_TASK_RATE_HZ), TASK_PRIORITY_LOW),
|
||||
#endif
|
||||
|
||||
#ifdef USE_POS_HOLD_MODE
|
||||
#ifdef USE_POSITION_HOLD
|
||||
[TASK_POSHOLD] = DEFINE_TASK("POSHOLD", NULL, NULL, updatePosHold, TASK_PERIOD_HZ(POSHOLD_TASK_RATE_HZ), TASK_PRIORITY_LOW),
|
||||
#endif
|
||||
|
||||
|
@ -544,11 +544,11 @@ void tasksInit(void)
|
|||
setTaskEnabled(TASK_GPS_RESCUE, featureIsEnabled(FEATURE_GPS));
|
||||
#endif
|
||||
|
||||
#ifdef USE_ALT_HOLD_MODE
|
||||
#ifdef USE_ALTITUDE_HOLD
|
||||
setTaskEnabled(TASK_ALTHOLD, sensors(SENSOR_BARO) || featureIsEnabled(FEATURE_GPS));
|
||||
#endif
|
||||
|
||||
#ifdef USE_POS_HOLD_MODE
|
||||
#ifdef USE_POSITION_HOLD
|
||||
setTaskEnabled(TASK_POSHOLD, featureIsEnabled(FEATURE_GPS));
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue