12 const int16_t
s = (int16_t)(v > 32767 ? 32767 : (v < -32768 ? -32768 : v));
13 memcpy(&it->
value, &
s,
sizeof s);
70 const uint8_t q = (in->
flow_q == 0xFFu) ? 0u : in->
flow_q;
86 uint8_t req = 0, rec = 0;
94 (int32_t)((uint16_t)req | ((uint16_t)rec << 8)));
100 uint8_t rdy = 1, bf = 0;
101 for (uint8_t k = 0; k <
n; ++k) {
static void done(uint8_t step)
static void put(pv2_check_t *it, uint8_t id, uint8_t st, int32_t v)
uint8_t checks_build(const checks_in_t *in, pv2_check_t *it, uint8_t *ready, uint8_t *battery_fail)
fills items (PV2_CHECKS_MAX), returns the count; *ready = no FAIL; *battery_fail = the battery item i...
Pre-flight checks (CHECKS frame, HANDOVER_FW.md §9).
@ PV2_CHK_USB
FAIL while a USB host is connected: no ARM.
float gf_max_alt
param gfMaxAlt
uint8_t usb_host
a USB host is connected (item 12, FAIL)
uint8_t flow_ok
bridge alive, PMW3901 OK
uint8_t hold_mode
ALT_HOLD / POS_HOLD: centre stick = hold
uint8_t batt_monitor
battery measured (BattTask runs)
uint16_t sensors
CAPS bits
float gf_max_dist
param gfMaxDist
uint8_t rc_fresh
RC from the app in the last 0.5 s
uint32_t cal_done_mask
bit (type-1): calibration done and saved
uint8_t imu_ok
IMU initialised
uint8_t batt_stale
BattTask silent
uint8_t batt_level
latched level from the flight core
uint8_t est_running
attitude estimate converged and running
uint8_t flow_q
0..100, 0xFF n/a
float batt_cell_v
average cell, sagged and filtered
uint8_t alt_valid
vertical estimate running (baro / ToF)
uint8_t id
< 0x0F CHECKS item (after ready u8, n u8)
static USBD_StatusTypeDef st(HAL_StatusTypeDef h)