Plane: use ahrs singleton to log ATT, POS and AHRS2

This commit is contained in:
Peter Barker 2019-10-24 11:33:20 +11:00 committed by Peter Barker
parent 9c57862ec6
commit 1d99fbebc9
1 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ void Plane::Log_Write_Attitude(void)
targets *= degrees(100.0f);
logger.Write_AttitudeView(*quadplane.ahrs_view, targets);
} else {
logger.Write_Attitude(ahrs, targets);
logger.Write_Attitude(targets);
}
if (quadplane.in_vtol_mode() || quadplane.in_assisted_flight()) {
// log quadplane PIDs separately from fixed wing PIDs
@ -44,12 +44,12 @@ void Plane::Log_Write_Attitude(void)
#if AP_AHRS_NAVEKF_AVAILABLE
AP::ahrs_navekf().Log_Write();
logger.Write_AHRS2(ahrs);
logger.Write_AHRS2();
#endif
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
sitl.Log_Write_SIMSTATE();
#endif
logger.Write_POS(ahrs);
logger.Write_POS();
}
// do logging at loop rate