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

#include <arpirobot/devices/drv8833/DRV8833Motor.hpp>

Inheritance diagram for arpirobot::DRV8833Motor:
arpirobot::MotorController arpirobot::IoDevice arpirobot::BaseDevice

Public Member Functions

 DRV8833Motor (int in1Pin, int in2Pin, int slpPin)
 
 DRV8833Motor (const DRV8833Motor &other)=delete
 
DRV8833Motoroperator= (const DRV8833Motor &other)=delete
 
- Public Member Functions inherited from arpirobot::MotorController
bool isInverted ()
 
void setInverted (bool inverted)
 
bool isBrakeMode ()
 
void setBrakeMode (bool brakeMode)
 
double getSpeed ()
 
void setSpeed (double speed)
 
- 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...
 

Protected Member Functions

void begin () override
 
void run () override
 
void close () override
 
- Protected Member Functions inherited from arpirobot::MotorController
bool isEnabled () override
 
bool shouldMatchRobotState () override
 
bool shouldDisableWithWatchdog () override
 
void enable () override
 
void disable () override
 

Additional Inherited Members

- Protected Attributes inherited from arpirobot::MotorController
double speed = 0
 
std::mutex lock
 
bool enabled = false
 
bool brakeMode = false
 
int8_t speedFactor = 1
 
- Protected Attributes inherited from arpirobot::BaseDevice
bool initialized = false
 
std::string deviceName
 

Detailed Description

Motor on DRV8833 module

Constructor & Destructor Documentation

◆ DRV8833Motor()

arpirobot::DRV8833Motor::DRV8833Motor ( int  in1Pin,
int  in2Pin,
int  slpPin 
)
Parameters
in1Pinpin for side 1 directional control
in2Pinpin for side 2 directional control
slpPinpin for sleep of module

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