Skip to content

Commit

Permalink
always use ahrs.status, never ahrs_float.status
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Oct 4, 2011
1 parent b386d33 commit 10f6a86
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion sw/airborne/subsystems/ahrs.h
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion sw/airborne/subsystems/ahrs/ahrs_float_cmpl_rmat.c
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion sw/airborne/subsystems/ahrs/ahrs_float_dcm.c
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sw/airborne/subsystems/ahrs/ahrs_infrared.c
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion sw/airborne/subsystems/ahrs/ahrs_sim.c
Expand Up @@ -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);
Expand Down

0 comments on commit 10f6a86

Please sign in to comment.