Firmware
Public Member Functions | List of all members
Battery Class Reference
Inheritance diagram for Battery:
ModuleParams ListNode< ModuleParams *>

Public Member Functions

void reset (battery_status_s *battery_status)
 Reset all battery stats and report invalid/nothing.
 
int cell_count ()
 Get the battery cell count.
 
float empty_cell_voltage ()
 Get the empty voltage per cell.
 
float full_cell_voltage ()
 Get the full voltage per cell.
 
void updateBatteryStatus (hrt_abstime timestamp, float voltage_v, float current_a, bool connected, bool selected_source, int priority, float throttle_normalized, bool armed, battery_status_s *status)
 Update current battery status message. More...
 
- Public Member Functions inherited from ModuleParams
 ModuleParams (ModuleParams *parent)
 
void setParent (ModuleParams *parent)
 Sets the parent module. More...
 
 ModuleParams (const ModuleParams &)=delete
 
ModuleParamsoperator= (const ModuleParams &)=delete
 
 ModuleParams (ModuleParams &&)=delete
 
ModuleParamsoperator= (ModuleParams &&)=delete
 
- Public Member Functions inherited from ListNode< ModuleParams *>
void setSibling (ModuleParams * sibling)
 
const ModuleParamsgetSibling () const
 

Additional Inherited Members

- Protected Member Functions inherited from ModuleParams
virtual void updateParams ()
 Call this method whenever the module gets a parameter change notification. More...
 
virtual void updateParamsImpl ()
 The implementation for this is generated with the macro DEFINE_PARAMETERS()
 
- Protected Attributes inherited from ListNode< ModuleParams *>
ModuleParams_sibling
 

Member Function Documentation

§ updateBatteryStatus()

void Battery::updateBatteryStatus ( hrt_abstime  timestamp,
float  voltage_v,
float  current_a,
bool  connected,
bool  selected_source,
int  priority,
float  throttle_normalized,
bool  armed,
battery_status_s *  status 
)

Update current battery status message.

Parameters
voltage_vcurrent voltage in V
current_acurrent current in A
connectedBattery is connected
selected_sourceThis battery is on the brick that the selected source for selected_source
priorityThe brick number -1. The term priority refers to the Vn connection on the LTC4417
throttle_normalizedthrottle from 0 to 1

The documentation for this class was generated from the following files: