![]() |
ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
|
Data exchanged between the flight context (ImuTask) and the AppTask. More...
Go to the source code of this file.
Data Structures | |
| struct | fsh_est_t |
| struct | fsh_apply_t |
| calibration to apply (AppTask -> ImuTask) More... | |
Functions | |
| void | fsh_est_write (const fsh_est_t *s) |
| ImuTask. | |
| void | fsh_est_read (fsh_est_t *out) |
| AppTask: keeps *out on a race. | |
| int | fsh_cal_push (const cal_sample_t *s) |
| int | fsh_cal_pop (cal_sample_t *s) |
| int | fsh_apply_post (uint8_t type, const cal_set_t *set) |
| int | fsh_apply_take (fsh_apply_t *a) |
| void | fsh_reset (void) |
Variables | |
| volatile uint8_t | g_fsh_cal_want |
| calibration samples (ImuTask -> AppTask) | |
Data exchanged between the flight context (ImuTask) and the AppTask.
ImuTask -> AppTask estimator / vertical state (seqlock, never blocks) ImuTask -> AppTask calibration samples (SPSC, only on request) AppTask -> ImuTask calibration to apply (SPSC)
The flight core has its own queues (fc_core.h). Host-testable.
Definition in file fc_shared.h.
| void fsh_est_write | ( | const fsh_est_t * | s | ) |
ImuTask.
Definition at line 23 of file fc_shared.c.
References s, s_est, s_seq, and SPSC_BARRIER.
Referenced by publish_est().
| void fsh_est_read | ( | fsh_est_t * | out | ) |
AppTask: keeps *out on a race.
Definition at line 32 of file fc_shared.c.
References s_est, s_seq, and SPSC_BARRIER.
Referenced by build_checks(), events(), log_sensors(), send_flight(), send_nav(), send_system(), and sensors_now().
| int fsh_cal_push | ( | const cal_sample_t * | s | ) |
Definition at line 44 of file fc_shared.c.
References s, and spsc_push().
Referenced by on_state().
| int fsh_cal_pop | ( | cal_sample_t * | s | ) |
Definition at line 45 of file fc_shared.c.
References s, and spsc_pop().
Referenced by calibration().
| int fsh_apply_post | ( | uint8_t | type, |
| const cal_set_t * | set | ||
| ) |
Definition at line 47 of file fc_shared.c.
References fsh_apply_t::set, set, spsc_push(), and fsh_apply_t::type.
Referenced by app_task_boot(), and cal_apply().
| int fsh_apply_take | ( | fsh_apply_t * | a | ) |
Definition at line 55 of file fc_shared.c.
References spsc_pop().
Referenced by ImuTask(), and take_calibrations().
| void fsh_reset | ( | void | ) |
Definition at line 15 of file fc_shared.c.
References g_fsh_cal_want, s_seq, and spsc_reset().
Referenced by app_task_boot().
|
extern |
calibration samples (ImuTask -> AppTask)
AppTask: 1 while samples are needed
Definition at line 7 of file fc_shared.c.
Referenced by calibration(), fsh_reset(), and on_state().