ArPiRobot-CoreLib C++
C++ library for ArPiRobot robots
Public Member Functions | Protected Member Functions | List of all members
arpirobot::INA260PowerSensor Class Reference

#include <arpirobot/devices/ina260/INA260PowerSensor.hpp>

Inheritance diagram for arpirobot::INA260PowerSensor:
arpirobot::BaseDevice arpirobot::MainVmon

Public Member Functions

 INA260PowerSensor (int bus=-1)
 
 INA260PowerSensor (const INA260PowerSensor &other)=delete
 
INA260PowerSensoroperator= (const INA260PowerSensor &other)=delete
 
double getCurrent ()
 
double getVolgate ()
 
double getPower ()
 
- Public Member Functions inherited from arpirobot::BaseDevice
virtual std::string getDeviceName ()
 
bool isLockedByAction (std::shared_ptr< Action > action=nullptr)
 Check if a given action locks the device. More...
 
bool isLockedByAction (Action &action)
 Check if a given action locks the device. More...
 
- Public Member Functions inherited from arpirobot::MainVmon
void makeMainVmon ()
 

Protected Member Functions

void begin () override
 
bool isEnabled () override
 
bool shouldMatchRobotState () override
 
bool shouldDisableWithWatchdog () override
 
void enable () override
 
void disable () override
 
- Protected Member Functions inherited from arpirobot::MainVmon
bool isMainVmon ()
 
void sendMainBatteryVoltage (double voltage)
 

Additional Inherited Members

- Protected Attributes inherited from arpirobot::BaseDevice
bool initialized = false
 
std::string deviceName
 

Detailed Description

INA260 Power sensor

Member Function Documentation

◆ getCurrent()

double arpirobot::INA260PowerSensor::getCurrent ( )

Get current measurement

Returns
Current in mA

◆ getPower()

double arpirobot::INA260PowerSensor::getPower ( )

Get power measurement

Returns
Power in mW

◆ getVolgate()

double arpirobot::INA260PowerSensor::getVolgate ( )

Get voltage measurement

Returns
Voltage in V

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