APM:Libraries
Public Member Functions | Private Member Functions | Private Attributes | List of all members
AP_BattMonitor_Bebop Class Reference

#include <AP_BattMonitor_Bebop.h>

Inheritance diagram for AP_BattMonitor_Bebop:
[legend]
Collaboration diagram for AP_BattMonitor_Bebop:
[legend]

Public Member Functions

 AP_BattMonitor_Bebop (AP_BattMonitor &mon, AP_BattMonitor::BattMonitor_State &mon_state, AP_BattMonitor_Params &params)
 
virtual ~AP_BattMonitor_Bebop (void)
 
void init () override
 
void read () override
 
bool has_current () const override
 returns true if battery monitor instance provides current info More...
 
- Public Member Functions inherited from AP_BattMonitor_Backend
 AP_BattMonitor_Backend (AP_BattMonitor &mon, AP_BattMonitor::BattMonitor_State &mon_state, AP_BattMonitor_Params &params)
 
virtual ~AP_BattMonitor_Backend (void)
 
virtual bool has_consumed_energy () const
 returns true if battery monitor instance provides consumed energy info More...
 
virtual bool has_cell_voltages () const
 
uint8_t capacity_remaining_pct () const
 capacity_remaining_pct - returns the % battery capacity remaining (0 ~ 100) More...
 
void update_resistance_estimate ()
 
virtual void handle_bi_msg (float voltage, float current, float temperature)
 

Private Member Functions

float _compute_compensation (const uint16_t *rpm, float vbat_raw)
 
float _filter_voltage (float vbat_raw)
 
float _compute_battery_percentage (float vbat)
 

Private Attributes

float _prev_vbat_raw
 
float _prev_vbat
 
float _battery_voltage_max
 

Additional Inherited Members

- Protected Attributes inherited from AP_BattMonitor_Backend
AP_BattMonitor_mon
 
AP_BattMonitor::BattMonitor_State_state
 
AP_BattMonitor_Params_params
 

Detailed Description

Definition at line 21 of file AP_BattMonitor_Bebop.h.

Constructor & Destructor Documentation

◆ AP_BattMonitor_Bebop()

AP_BattMonitor_Bebop::AP_BattMonitor_Bebop ( AP_BattMonitor mon,
AP_BattMonitor::BattMonitor_State mon_state,
AP_BattMonitor_Params params 
)
inline

Definition at line 25 of file AP_BattMonitor_Bebop.h.

◆ ~AP_BattMonitor_Bebop()

virtual AP_BattMonitor_Bebop::~AP_BattMonitor_Bebop ( void  )
inlinevirtual

Definition at line 32 of file AP_BattMonitor_Bebop.h.

Here is the call graph for this function:

Member Function Documentation

◆ _compute_battery_percentage()

float AP_BattMonitor_Bebop::_compute_battery_percentage ( float  vbat)
private

Definition at line 136 of file AP_BattMonitor_Bebop.cpp.

◆ _compute_compensation()

float AP_BattMonitor_Bebop::_compute_compensation ( const uint16_t *  rpm,
float  vbat_raw 
)
private

Definition at line 118 of file AP_BattMonitor_Bebop.cpp.

◆ _filter_voltage()

float AP_BattMonitor_Bebop::_filter_voltage ( float  vbat_raw)
private

Definition at line 88 of file AP_BattMonitor_Bebop.cpp.

◆ has_current()

bool AP_BattMonitor_Bebop::has_current ( ) const
inlineoverridevirtual

returns true if battery monitor instance provides current info

Implements AP_BattMonitor_Backend.

Definition at line 41 of file AP_BattMonitor_Bebop.h.

◆ init()

void AP_BattMonitor_Bebop::init ( void  )
overridevirtual

Implements AP_BattMonitor_Backend.

Definition at line 81 of file AP_BattMonitor_Bebop.cpp.

Referenced by ~AP_BattMonitor_Bebop().

Here is the caller graph for this function:

◆ read()

void AP_BattMonitor_Bebop::read ( void  )
overridevirtual

Implements AP_BattMonitor_Backend.

Definition at line 159 of file AP_BattMonitor_Bebop.cpp.

Referenced by ~AP_BattMonitor_Bebop().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _battery_voltage_max

float AP_BattMonitor_Bebop::_battery_voltage_max
private

Definition at line 46 of file AP_BattMonitor_Bebop.h.

◆ _prev_vbat

float AP_BattMonitor_Bebop::_prev_vbat
private

Definition at line 45 of file AP_BattMonitor_Bebop.h.

◆ _prev_vbat_raw

float AP_BattMonitor_Bebop::_prev_vbat_raw
private

Definition at line 41 of file AP_BattMonitor_Bebop.h.

Referenced by has_current().


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