![]() |
ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
|
Pre-flight checks (CHECKS frame, HANDOVER_FW.md §9). More...
Go to the source code of this file.
Data Structures | |
| struct | checks_in_t |
Functions | |
| uint8_t | checks_build (const checks_in_t *in, pv2_check_t *items, uint8_t *ready, uint8_t *battery_fail) |
| fills items (PV2_CHECKS_MAX), returns the count; *ready = no FAIL; *battery_fail = the battery item is in FAIL (ARM -> BATTERY_LOW) | |
Pre-flight checks (CHECKS frame, HANDOVER_FW.md §9).
Host-testable.
Only the items that apply are evaluated; the others are sent as N/A (the app greys them). ready = no item in FAIL.
Definition in file checks.h.
| uint8_t checks_build | ( | const checks_in_t * | in, |
| pv2_check_t * | items, | ||
| uint8_t * | ready, | ||
| uint8_t * | battery_fail | ||
| ) |
fills items (PV2_CHECKS_MAX), returns the count; *ready = no FAIL; *battery_fail = the battery item is in FAIL (ARM -> BATTERY_LOW)
Definition at line 16 of file checks.c.
References checks_in_t::alt_valid, checks_in_t::att_unc_deg, checks_in_t::batt_cell_v, checks_in_t::batt_level, checks_in_t::batt_monitor, checks_in_t::batt_present, checks_in_t::batt_stale, checks_in_t::cal_done_mask, done(), checks_in_t::est_running, checks_in_t::flow_ok, checks_in_t::flow_q, checks_in_t::gf_max_alt, checks_in_t::gf_max_dist, checks_in_t::hold_mode, checks_in_t::imu_ok, checks_in_t::in_air, checks_in_t::mag_interf_pct, n, put(), PV2_BATT_CRITICAL, PV2_BATT_LOW, PV2_CAL_ACCEL, PV2_CAL_COMPASS, PV2_CAL_GYRO, PV2_CAL_LEVEL, PV2_CHK_BATTERY, PV2_CHK_CALIBRATION, PV2_CHK_COMPASS, PV2_CHK_EKF, PV2_CHK_FAILSAFE, PV2_CHK_FLOW, PV2_CHK_GNSS, PV2_CHK_HOME, PV2_CHK_IMU, PV2_CHK_RADIO, PV2_CHK_THROTTLE, PV2_CHK_USB, PV2_CK_FAIL, PV2_CK_NA, PV2_CK_OK, PV2_CK_WARN, PV2_S_BARO, PV2_S_FLOW, PV2_S_GNSS, PV2_S_MAG_FC, PV2_S_TOF, checks_in_t::rc_fresh, checks_in_t::rc_thr, checks_in_t::sensors, st(), and checks_in_t::usb_host.
Referenced by build_checks().