26#define BATT_TASK_PERIOD_MS 20u
31 int (*adc_read)(
float *vbat_pin,
float *cur_pin);
void batt_task_last_flight(batt_flight_t *out)
last flight (any task, seqlock)
void batt_task_step(uint32_t now_ms)
int batt_task_post_scales(float scale_v, float scale_i)
AppTask -> BattTask: new calibration scales; 0 = queued.
void batt_task_init(const batt_task_cfg_t *cfg)
void batt_task_start(const batt_task_cfg_t *cfg)
Battery monitor: voltage, current, consumed charge, cell count, state of charge, flight time left and...
last flight summary (AppTask persists it for the BATTERY calibration)
float used_mah
charge used between ARM and DISARM
uint16_t count
flights finished since boot
float scale_i
current scale it was counted with
batt_cfg_t batt
sensor gains, scales at boot