Plane: pass height to landing gear update
This commit is contained in:
parent
486ecd6148
commit
432d786f82
@ -102,7 +102,7 @@ const AP_Scheduler::Task Plane::scheduler_tasks[] = {
|
||||
SCHED_TASK(publish_osd_info, 1, 10),
|
||||
#endif
|
||||
#if LANDING_GEAR_ENABLED == ENABLED
|
||||
SCHED_TASK_CLASS(AP_LandingGear, &plane.g2.landing_gear, update, 10, 50),
|
||||
SCHED_TASK(landing_gear_update, 5, 50),
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -961,6 +961,7 @@ private:
|
||||
void takeoff_calc_pitch(void);
|
||||
int8_t takeoff_tail_hold(void);
|
||||
int16_t get_takeoff_pitch_min_cd(void);
|
||||
void landing_gear_update(void);
|
||||
void complete_auto_takeoff(void);
|
||||
void ahrs_update();
|
||||
void update_speed_height(void);
|
||||
|
@ -272,3 +272,14 @@ void Plane::complete_auto_takeoff(void)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#if LANDING_GEAR_ENABLED == ENABLED
|
||||
/*
|
||||
update landing gear
|
||||
*/
|
||||
void Plane::landing_gear_update(void)
|
||||
{
|
||||
g2.landing_gear.update(relative_ground_altitude(g.rangefinder_landing));
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user