Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Dispatcher to register actual AHRS implementations. More...
Go to the source code of this file.
Data Structures | |
struct | AhrsImpl |
references a registered AHRS implementation More... | |
Macros | |
#define | __RegisterAhrs(_x) _x ## _register() |
#define | _RegisterAhrs(_x) __RegisterAhrs(_x) |
#define | RegisterAhrs(_x) _RegisterAhrs(_x) |
#define | AHRS_NB_IMPL 2 |
maximum number of AHRS implementations that can register More... | |
Functions | |
void | ahrs_register_impl (AhrsEnableOutput enable) |
Register an AHRS implementation. More... | |
void | ahrs_init (void) |
AHRS initialization. More... | |
int | ahrs_switch (uint8_t idx) |
Switch to the output of another AHRS impl. More... | |
Variables | |
struct AhrsImpl | ahrs_impls [AHRS_NB_IMPL] |
uint8_t | ahrs_output_idx |
Dispatcher to register actual AHRS implementations.
Definition in file ahrs.c.
struct AhrsImpl |
Data Fields | ||
---|---|---|
AhrsEnableOutput | enable |
#define _RegisterAhrs | ( | _x | ) | __RegisterAhrs(_x) |
#define AHRS_NB_IMPL 2 |
#define RegisterAhrs | ( | _x | ) | _RegisterAhrs(_x) |
void ahrs_init | ( | void | ) |
AHRS initialization.
Called at startup. Registers/initializes the default AHRS.
Definition at line 73 of file ahrs.c.
References ahrs_aligner_init(), ahrs_impls, AHRS_NB_IMPL, ahrs_switch(), AhrsImpl::enable, PRIMARY_AHRS, and RegisterAhrs.
Referenced by main_init().
void ahrs_register_impl | ( | AhrsEnableOutput | enable | ) |
Register an AHRS implementation.
Adds it to an internal list.
enable | pointer to function to enable/disable the output of registering AHRS |
Definition at line 62 of file ahrs.c.
References ahrs_impls, AHRS_NB_IMPL, and AhrsImpl::enable.
Referenced by ahrs_chimu_register(), ahrs_dcm_register(), ahrs_fc_register(), ahrs_float_invariant_register(), ahrs_icq_register(), ahrs_madgwick_register(), ahrs_mlkf_register(), ahrs_sim_register(), and ahrs_vectornav_register().
int ahrs_switch | ( | uint8_t | idx | ) |
Switch to the output of another AHRS impl.
idx | index of the AHRS impl (0 = PRIMARY_AHRS, 1 = SECONDARY_AHRS). |
Definition at line 93 of file ahrs.c.
References ahrs_impls, AHRS_NB_IMPL, ahrs_output_idx, AhrsImpl::enable, FALSE, idx, and TRUE.
Referenced by ahrs_init().
struct AhrsImpl ahrs_impls[AHRS_NB_IMPL] |
Definition at line 1 of file ahrs.c.
Referenced by ahrs_init(), ahrs_register_impl(), and ahrs_switch().
uint8_t ahrs_output_idx |
Definition at line 60 of file ahrs.c.
Referenced by ahrs_switch().