mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
Plane: moved accel cal update to vehicle code
This commit is contained in:
parent
ab36dc0ed9
commit
baec0d83f2
@ -64,7 +64,6 @@ const AP_Scheduler::Task Plane::scheduler_tasks[] = {
|
|||||||
SCHED_TASK(read_rangefinder, 50, 100),
|
SCHED_TASK(read_rangefinder, 50, 100),
|
||||||
SCHED_TASK_CLASS(AP_ICEngine, &plane.g2.ice_control, update, 10, 100),
|
SCHED_TASK_CLASS(AP_ICEngine, &plane.g2.ice_control, update, 10, 100),
|
||||||
SCHED_TASK_CLASS(Compass, &plane.compass, cal_update, 50, 50),
|
SCHED_TASK_CLASS(Compass, &plane.compass, cal_update, 50, 50),
|
||||||
SCHED_TASK(accel_cal_update, 10, 50),
|
|
||||||
#if OPTFLOW == ENABLED
|
#if OPTFLOW == ENABLED
|
||||||
SCHED_TASK_CLASS(OpticalFlow, &plane.optflow, update, 50, 50),
|
SCHED_TASK_CLASS(OpticalFlow, &plane.optflow, update, 50, 50),
|
||||||
#endif
|
#endif
|
||||||
|
@ -1032,7 +1032,6 @@ private:
|
|||||||
void read_rangefinder(void);
|
void read_rangefinder(void);
|
||||||
void read_airspeed(void);
|
void read_airspeed(void);
|
||||||
void rpm_update(void);
|
void rpm_update(void);
|
||||||
void accel_cal_update(void);
|
|
||||||
|
|
||||||
// system.cpp
|
// system.cpp
|
||||||
void init_ardupilot() override;
|
void init_ardupilot() override;
|
||||||
|
@ -34,20 +34,6 @@ void Plane::read_rangefinder(void)
|
|||||||
rangefinder_height_update();
|
rangefinder_height_update();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
Accel calibration
|
|
||||||
*/
|
|
||||||
void Plane::accel_cal_update() {
|
|
||||||
if (hal.util->get_soft_armed()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
ins.acal_update();
|
|
||||||
float trim_roll, trim_pitch;
|
|
||||||
if(ins.get_new_trim(trim_roll, trim_pitch)) {
|
|
||||||
ahrs.set_trim(Vector3f(trim_roll, trim_pitch, 0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ask airspeed sensor for a new value
|
ask airspeed sensor for a new value
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user