mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-01 04:46:51 +08:00
[fixedwing] removed AhrsEvent
This commit is contained in:
@@ -93,8 +93,6 @@ static inline void on_gyro_event( void );
|
|||||||
static inline void on_accel_event( void );
|
static inline void on_accel_event( void );
|
||||||
static inline void on_mag_event( void );
|
static inline void on_mag_event( void );
|
||||||
volatile uint8_t ahrs_timeout_counter = 0;
|
volatile uint8_t ahrs_timeout_counter = 0;
|
||||||
#else
|
|
||||||
static inline void on_ahrs_event(void);
|
|
||||||
#endif // USE_IMU
|
#endif // USE_IMU
|
||||||
#endif // USE_AHRS
|
#endif // USE_AHRS
|
||||||
|
|
||||||
@@ -587,13 +585,9 @@ void event_task_ap( void ) {
|
|||||||
i2c_event();
|
i2c_event();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if USE_AHRS
|
#if USE_AHRS && USE_IMU
|
||||||
#if USE_IMU
|
|
||||||
ImuEvent(on_gyro_event, on_accel_event, on_mag_event);
|
ImuEvent(on_gyro_event, on_accel_event, on_mag_event);
|
||||||
#else
|
#endif
|
||||||
AhrsEvent(on_ahrs_event);
|
|
||||||
#endif // USE_IMU
|
|
||||||
#endif // USE_AHRS
|
|
||||||
|
|
||||||
#if USE_GPS
|
#if USE_GPS
|
||||||
GpsEvent(on_gps_solution);
|
GpsEvent(on_gps_solution);
|
||||||
@@ -725,13 +719,6 @@ static inline void on_mag_event(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // USE_IMU not defined
|
|
||||||
static inline void on_ahrs_event(void)
|
|
||||||
{
|
|
||||||
#ifdef AHRS_UPDATE_FW_ESTIMATOR
|
|
||||||
ahrs_update_fw_estimator();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif // USE_IMU
|
#endif // USE_IMU
|
||||||
|
|
||||||
#endif // USE_AHRS
|
#endif // USE_AHRS
|
||||||
|
|||||||
@@ -36,7 +36,4 @@ extern void ahrs_update_infrared(void);
|
|||||||
// TODO copy ahrs to state instead of estimator
|
// TODO copy ahrs to state instead of estimator
|
||||||
extern void ahrs_update_fw_estimator(void);
|
extern void ahrs_update_fw_estimator(void);
|
||||||
|
|
||||||
#define AhrsEvent(_available_callback) { \
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* AHRS_INFRARED_H */
|
#endif /* AHRS_INFRARED_H */
|
||||||
|
|||||||
@@ -53,6 +53,10 @@ void update_ahrs_from_sim(void) {
|
|||||||
FLOAT_RMAT_OF_EULERS(ahrs_float.ltp_to_imu_rmat, ahrs_float.ltp_to_imu_euler);
|
FLOAT_RMAT_OF_EULERS(ahrs_float.ltp_to_imu_rmat, ahrs_float.ltp_to_imu_euler);
|
||||||
|
|
||||||
compute_body_orientation_and_rates();
|
compute_body_orientation_and_rates();
|
||||||
|
|
||||||
|
#ifdef AHRS_UPDATE_FW_ESTIMATOR
|
||||||
|
ahrs_update_fw_estimator();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -92,6 +96,10 @@ void ahrs_align(void)
|
|||||||
|
|
||||||
|
|
||||||
void ahrs_propagate(void) {
|
void ahrs_propagate(void) {
|
||||||
|
if (ahrs_sim_available) {
|
||||||
|
update_ahrs_from_sim();
|
||||||
|
ahrs_sim_available = FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ahrs_update_accel(void) {
|
void ahrs_update_accel(void) {
|
||||||
|
|||||||
@@ -37,14 +37,4 @@ extern float ins_pitch_neutral;
|
|||||||
|
|
||||||
extern void update_ahrs_from_sim(void);
|
extern void update_ahrs_from_sim(void);
|
||||||
|
|
||||||
#define AhrsEvent(_available_callback) { \
|
|
||||||
if (ahrs_sim_available) { \
|
|
||||||
update_ahrs_from_sim(); \
|
|
||||||
_available_callback(); \
|
|
||||||
ahrs_sim_available = FALSE; \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* AHRS_SIM_H */
|
#endif /* AHRS_SIM_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user