PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <voxlpm.hpp>
Public Member Functions | |
VOXLPM (const char *path, int bus, int address, VOXLPM_CH_TYPE ch_type) | |
virtual | ~VOXLPM () |
virtual int | init () |
void | print_info () |
Private Member Functions | |
void | Run () override |
void | start () |
void | stop () |
int | measure () |
uint8_t | read_reg (uint8_t addr) |
int | read_reg_buf (uint8_t addr, uint8_t *buf, uint8_t len) |
int | write_reg (uint8_t value, uint8_t addr) |
Private Attributes | |
unsigned | _meas_interval {100000} |
perf_counter_t | _sample_perf |
orb_advert_t | _bat_pub_topic |
orb_advert_t | _pm_pub_topic |
struct battery_status_s | _bat_status |
struct power_monitor_s | _pm_status |
VOXLPM_CH_TYPE | _ch_type |
float | _voltage |
float | _amperage |
float | _rsense |
Battery | _battery |
Definition at line 145 of file voxlpm.hpp.
VOXLPM::VOXLPM | ( | const char * | path, |
int | bus, | ||
int | address, | ||
VOXLPM_CH_TYPE | ch_type | ||
) |
Definition at line 46 of file voxlpm.cpp.
References _ch_type, _rsense, VOXLPM_CH_TYPE_VBATT, VOXLPM_RSENSE_5VOUT, and VOXLPM_RSENSE_VBATT.
|
virtual |
Definition at line 65 of file voxlpm.cpp.
References _sample_perf, perf_free(), and stop().
|
virtual |
Definition at line 73 of file voxlpm.cpp.
References _bat_status, _battery, DEFAULT_CTRLA_REG_VAL, DEFAULT_CTRLB_REG_VAL, ToneAlarmInterface::init(), OK, Battery::reset(), start(), VOXLPM_LTC2946_CTRLA_REG, VOXLPM_LTC2946_CTRLB_REG, and write_reg().
Referenced by voxlpm::start_bus().
|
private |
Definition at line 134 of file voxlpm.cpp.
References _amperage, _bat_pub_topic, _bat_status, _battery, _ch_type, _pm_pub_topic, _pm_status, _rsense, _sample_perf, _voltage, power_monitor_s::current_a, hrt_absolute_time(), hrt_abstime, OK, orb_advertise(), ORB_ID, orb_publish(), perf_begin(), perf_end(), read_reg_buf(), power_monitor_s::timestamp, Battery::updateBatteryStatus(), power_monitor_s::voltage_v, VOXLPM_CH_TYPE_P5VDC, VOXLPM_CH_TYPE_VBATT, VOXLPM_LTC2946_DELTA_SENSE_MSB_REG, VOXLPM_LTC2946_RESOLUTION, VOXLPM_LTC2946_VFS_DELTA_SENSE, VOXLPM_LTC2946_VFS_SENSE, and VOXLPM_LTC2946_VIN_MSB_REG.
Referenced by Run().
void VOXLPM::print_info | ( | ) |
Definition at line 93 of file voxlpm.cpp.
References _amperage, _ch_type, _meas_interval, _rsense, _sample_perf, _voltage, perf_print_counter(), and VOXLPM_CH_TYPE_VBATT.
|
private |
Definition at line 216 of file voxlpm.cpp.
|
private |
Definition at line 225 of file voxlpm.cpp.
Referenced by measure().
|
overrideprivate |
Definition at line 128 of file voxlpm.cpp.
References measure().
|
private |
Definition at line 111 of file voxlpm.cpp.
References _meas_interval, and stop().
Referenced by init().
|
private |
Definition at line 122 of file voxlpm.cpp.
Referenced by start(), and ~VOXLPM().
|
private |
Definition at line 232 of file voxlpm.cpp.
Referenced by init().
|
private |
Definition at line 171 of file voxlpm.hpp.
Referenced by measure(), and print_info().
|
private |
Definition at line 163 of file voxlpm.hpp.
Referenced by measure().
|
private |
Definition at line 166 of file voxlpm.hpp.
|
private |
Definition at line 174 of file voxlpm.hpp.
|
private |
Definition at line 169 of file voxlpm.hpp.
Referenced by measure(), print_info(), and VOXLPM().
|
private |
Definition at line 155 of file voxlpm.hpp.
Referenced by print_info(), and start().
|
private |
Definition at line 164 of file voxlpm.hpp.
Referenced by measure().
|
private |
Definition at line 167 of file voxlpm.hpp.
Referenced by measure().
|
private |
Definition at line 172 of file voxlpm.hpp.
Referenced by measure(), print_info(), and VOXLPM().
|
private |
Definition at line 161 of file voxlpm.hpp.
Referenced by measure(), print_info(), and ~VOXLPM().
|
private |
Definition at line 170 of file voxlpm.hpp.
Referenced by measure(), and print_info().