From 10f6a86400af1be7c1617d986e04aeefcf2915cd Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Wed, 5 Oct 2011 01:06:46 +0200 Subject: [PATCH] always use ahrs.status, never ahrs_float.status --- sw/airborne/subsystems/ahrs.h | 3 ++- sw/airborne/subsystems/ahrs/ahrs_float_cmpl_rmat.c | 2 +- sw/airborne/subsystems/ahrs/ahrs_float_dcm.c | 2 +- sw/airborne/subsystems/ahrs/ahrs_infrared.c | 2 +- sw/airborne/subsystems/ahrs/ahrs_sim.c | 4 +++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sw/airborne/subsystems/ahrs.h b/sw/airborne/subsystems/ahrs.h index 1db3f55b4e7..5a30258d63f 100644 --- a/sw/airborne/subsystems/ahrs.h +++ b/sw/airborne/subsystems/ahrs.h @@ -64,7 +64,8 @@ struct AhrsFloat { struct FloatRates body_rate; struct FloatRates body_rate_d; - uint8_t status; + // always use status from fixed point ahrs struct for now + //uint8_t status; }; extern struct Ahrs ahrs; diff --git a/sw/airborne/subsystems/ahrs/ahrs_float_cmpl_rmat.c b/sw/airborne/subsystems/ahrs/ahrs_float_cmpl_rmat.c index 5979a382460..1209262542a 100644 --- a/sw/airborne/subsystems/ahrs/ahrs_float_cmpl_rmat.c +++ b/sw/airborne/subsystems/ahrs/ahrs_float_cmpl_rmat.c @@ -44,7 +44,7 @@ static inline void compute_body_orientation_and_rates(void); struct AhrsFloatCmplRmat ahrs_impl; void ahrs_init(void) { - ahrs_float.status = AHRS_UNINIT; + ahrs.status = AHRS_UNINIT; /* Initialises IMU alignement */ struct FloatEulers body_to_imu_euler = diff --git a/sw/airborne/subsystems/ahrs/ahrs_float_dcm.c b/sw/airborne/subsystems/ahrs/ahrs_float_dcm.c index 3ca1a0f63d9..834555d7766 100644 --- a/sw/airborne/subsystems/ahrs/ahrs_float_dcm.c +++ b/sw/airborne/subsystems/ahrs/ahrs_float_dcm.c @@ -162,7 +162,7 @@ void ahrs_update_fw_estimator( void ) void ahrs_init(void) { - ahrs_float.status = AHRS_UNINIT; + ahrs.status = AHRS_UNINIT; /* * Initialises our IMU alignement variables diff --git a/sw/airborne/subsystems/ahrs/ahrs_infrared.c b/sw/airborne/subsystems/ahrs/ahrs_infrared.c index af839921dea..48febeef860 100644 --- a/sw/airborne/subsystems/ahrs/ahrs_infrared.c +++ b/sw/airborne/subsystems/ahrs/ahrs_infrared.c @@ -29,7 +29,7 @@ void ahrs_init(void) { - ahrs_float.status = AHRS_UNINIT; + ahrs.status = AHRS_UNINIT; /* set ltp_to_body to zero */ FLOAT_QUAT_ZERO(ahrs_float.ltp_to_body_quat); diff --git a/sw/airborne/subsystems/ahrs/ahrs_sim.c b/sw/airborne/subsystems/ahrs/ahrs_sim.c index 0133a66bebd..ea399730a07 100644 --- a/sw/airborne/subsystems/ahrs/ahrs_sim.c +++ b/sw/airborne/subsystems/ahrs/ahrs_sim.c @@ -58,7 +58,9 @@ void update_attitude_from_sim(void) { void ahrs_init(void) { - ahrs_float.status = AHRS_UNINIT; + //ahrs_float.status = AHRS_UNINIT; + // set to running for now and only use ahrs.status, not ahrs_float.status + ahrs.status = AHRS_RUNNING; /* set ltp_to_body to zero */ FLOAT_QUAT_ZERO(ahrs_float.ltp_to_body_quat);