ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
Loading...
Searching...
No Matches
checks.c File Reference

CHECKS items (see checks.h). More...

#include "checks.h"
#include <string.h>
Include dependency graph for checks.c:

Go to the source code of this file.

Functions

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 is in FAIL (ARM -> BATTERY_LOW)
 

Detailed Description

CHECKS items (see checks.h).

Reference: checks() in simDrone.ts.

Definition in file checks.c.

Function Documentation

◆ put()

static void put ( pv2_check_t *  it,
uint8_t  id,
uint8_t  st,
int32_t  v 
)
static

Definition at line 8 of file checks.c.

References id, pv2_check_t::id, s, st(), pv2_check_t::state, and pv2_check_t::value.

Referenced by checks_build().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checks_build()

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 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().

Here is the call graph for this function:
Here is the caller graph for this function: