![]() |
ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
|
published state More...
#include <battery.h>
Data Fields | |
| uint8_t | present |
| a battery is connected | |
| uint8_t | cells |
| 0 = not known | |
| uint8_t | level |
| PV2_BATT_OK / LOW / CRITICAL / EMERGENCY | |
| uint8_t | pct |
| 0…100 | |
| float | vbat |
| V, pack, filtered (τ 0.1 s) | |
| float | current |
| A, filtered (τ 0.05 s); 0 without a sensor | |
| float | used_mah |
| since power-on | |
| float | cell_v |
| V, sagged, filtered (τ 0.5 s): failsafes, CHECKS. | |
| float | cell_rest_v |
| V, sag compensated: state of charge | |
| float | r_cell |
| Ω per cell, estimate | |
| float | soc |
| 0…1 | |
| float | remain_s |
| s of flight left, < 0 = n/a | |
| float | vbat_raw |
| V, last sample, unfiltered (calibration) | |
| uint8_t batt_state_t::present |
a battery is connected
Definition at line 52 of file battery.h.
Referenced by batt_step(), and lost_battery().
| uint8_t batt_state_t::cells |
0 = not known
Definition at line 53 of file battery.h.
Referenced by batt_step(), lost_battery(), r_estimate(), and send_caps().
| uint8_t batt_state_t::level |
PV2_BATT_OK / LOW / CRITICAL / EMERGENCY
Definition at line 54 of file battery.h.
Referenced by batt_step(), cal_from_v1(), and lost_battery().
| uint8_t batt_state_t::pct |
| float batt_state_t::vbat |
V, pack, filtered (τ 0.1 s)
Definition at line 56 of file battery.h.
Referenced by batt_step(), and cal_batt().
| float batt_state_t::current |
A, filtered (τ 0.05 s); 0 without a sensor
Definition at line 57 of file battery.h.
Referenced by batt_step().
| float batt_state_t::used_mah |
| float batt_state_t::cell_v |
V, sagged, filtered (τ 0.5 s): failsafes, CHECKS.
Definition at line 59 of file battery.h.
Referenced by batt_step(), and lost_battery().
| float batt_state_t::cell_rest_v |
V, sag compensated: state of charge
Definition at line 60 of file battery.h.
Referenced by batt_step(), and lost_battery().
| float batt_state_t::r_cell |
Ω per cell, estimate
Definition at line 61 of file battery.h.
Referenced by batt_init(), batt_step(), and r_estimate().
| float batt_state_t::soc |
| float batt_state_t::remain_s |
s of flight left, < 0 = n/a
Definition at line 63 of file battery.h.
Referenced by batt_init(), batt_step(), and lost_battery().
| float batt_state_t::vbat_raw |
V, last sample, unfiltered (calibration)
Definition at line 64 of file battery.h.
Referenced by batt_step().