21 #include "../config/battery.h"
uint16_t battery_get_cell_voltage(struct battery *self)
Definition: battery.c:67
int32_t battery_get_spent_capacity(struct battery *self)
Definition: battery.c:63
const char * battery_get_state_str(struct battery *self)
Definition: battery.c:128
biquad_t vbatFilterState
Definition: battery.h:42
int32_t mAhDrawn
Definition: battery.h:39
uint16_t amperageLatestADC
Definition: battery.h:37
int32_t battery_get_current(struct battery *self)
Definition: battery.c:59
void battery_init(struct battery *self, const struct battery_config *config)
Definition: battery.c:39
const struct battery_config * config
Definition: battery.h:44
uint16_t batteryCriticalVoltage
Definition: battery.h:36
uint16_t battery_get_voltage(struct battery *self)
Definition: battery.c:51
uint16_t vbatLatestADC
Definition: battery.h:33
uint8_t battery_get_cell_count(struct battery *self)
Definition: battery.c:55
uint16_t batteryWarningVoltage
Definition: battery.h:35
uint8_t battery_get_remaining_capacity(struct battery *self)
Definition: battery.c:182
battery_state_t battery_get_state(struct battery *self)
Definition: battery.c:124
uint16_t vbat
Definition: battery.h:31
void battery_update(struct battery *self)
Definition: battery.c:91
int32_t amperage
Definition: battery.h:38
battery_state_t
Definition: battery.h:23
uint8_t batteryCellCount
Definition: battery.h:34
battery_state_t batteryState
Definition: battery.h:41
void battery_update_current_meter(struct battery *self, int32_t lastUpdateAt)
Definition: battery.c:144
uint16_t vbatRaw
Definition: battery.h:32
uint8_t battery_get_remaining_percent(struct battery *self)
Definition: battery.c:177