Plane: use ins singleton

This commit is contained in:
Peter Barker 2018-03-10 21:00:42 +11:00 committed by Lucas De Marchi
parent 3190974e4f
commit 7c86c4fe61
3 changed files with 6 additions and 6 deletions

View File

@ -262,7 +262,7 @@ void Plane::update_logging2(void)
Log_Write_RC();
if (should_log(MASK_LOG_IMU))
DataFlash.Log_Write_Vibration(ins);
DataFlash.Log_Write_Vibration();
}

View File

@ -158,7 +158,7 @@ void Plane::Log_Write_Status()
,armed : hal.util->get_soft_armed()
,safety : static_cast<uint8_t>(hal.util->safety_switch_state())
,is_crashed : crash_state.is_crashed
,is_still : plane.ins.is_still()
,is_still : AP::ins().is_still()
,stage : static_cast<uint8_t>(flight_stage)
,impact : crash_state.impact_detected
};
@ -279,9 +279,9 @@ void Plane::Log_Write_GPS(uint8_t instance)
}
}
void Plane::Log_Write_IMU()
void Plane::Log_Write_IMU()
{
DataFlash.Log_Write_IMU(ins);
DataFlash.Log_Write_IMU();
}
void Plane::Log_Write_RC(void)

View File

@ -216,9 +216,9 @@ private:
#if AP_AHRS_NAVEKF_AVAILABLE
NavEKF2 EKF2{&ahrs, rangefinder};
NavEKF3 EKF3{&ahrs, rangefinder};
AP_AHRS_NavEKF ahrs{ins, EKF2, EKF3};
AP_AHRS_NavEKF ahrs{EKF2, EKF3};
#else
AP_AHRS_DCM ahrs{ins};
AP_AHRS_DCM ahrs;
#endif
AP_TECS TECS_controller{ahrs, aparm, landing, g2.soaring_controller};