5#ifndef POWER_BALANCER_H
6#define POWER_BALANCER_H
void go_to_sleep()
call before the system goes to sleep
Definition: balancer.cpp:358
Status get_status()
Return the status of the balancer.
Definition: balancer.cpp:230
void enable_balancing(bool enable)
enable the battery balancing process
Definition: balancer.cpp:343
void loop()
call often to refresh measurments
Definition: balancer.cpp:287
bool init()
Call once on init.
Definition: balancer.cpp:232
Program scope.
Definition: control_fixed_modes.hpp:12
Store the balancer component status.
Definition: balancer.h:23
bool is_valid() const
True if this structure contains valid data.
Definition: balancer.cpp:27
std::array< uint16_t, batteryCount > batteryVoltages_mV
Cells voltages, in order.
Definition: balancer.h:25
uint16_t temperature_degrees
Temperature of the component, in degrees.
Definition: balancer.h:31
std::array< bool, batteryCount > isBalancing
True if the cell is currently balancing.
Definition: balancer.h:27
uint16_t stackVoltage_mV
Voltage of the battery pack, in millivolts.
Definition: balancer.h:29
uint32_t lastMeasurmentUpdate
Last time the measurment was updated, in milliseconds.
Definition: balancer.h:34
Define the system hardware constants.