32 #ifndef BATTERYMONITOR_H 33 #define BATTERYMONITOR_H 59 float voltage_multiplier = 0,
60 float current_multiplier = 0);
114 #endif // BATTERYMONITOR_H A driver for the analog-digital converters available on the microcontroller.
bool has_current_sense() const
Checks if current sense is available. As there isn't hardware to detect this, this simply checks if t...
void set_voltage_multiplier(double multiplier)
Sets the voltage multiplier for the battery monitor.
bool has_voltage_sense() const
Checks if voltage sense is available. As there isn't hardware to detect this, this simply checks if t...
float read_current() const
Read the current battery current.
float read_voltage() const
Read the current battery voltage.
A class to represent a single pin configured for analog input.
float voltage_multiplier_
void set_current_multiplier(double multiplier)
Sets the current multiplier for the battery monitor.
A driver for analog battery monitors.
void init(const BatteryMonitorHardwareStruct &def, AnalogDigitalConverter *adc, float voltage_multiplier=0, float current_multiplier=0)
Initialize the battery monitor.
float current_multiplier_