JMotor
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
JMotorDriverAvrHBridge Class Reference

#include <JMotorDriverAvrHBridge.h>

Inheritance diagram for JMotorDriverAvrHBridge:
Inheritance graph
[legend]
Collaboration diagram for JMotorDriverAvrHBridge:
Collaboration graph
[legend]

Public Member Functions

 JMotorDriverAvrHBridge (byte _pinPos, byte _pinNeg, bool _reverse=false)
 
bool set (float val)
 set motor power
 
bool setEnable (bool _enable)
 use to enable or disable a motor, and sets up pin states
 
bool getEnable ()
 get the enable state of the driver
 
float getMaxRange ()
 high end of the range
 
float getMinRange ()
 low end of the range
 
- Public Member Functions inherited from JMotorDriver
bool enable ()
 enable motor
 
bool disable ()
 disable motor
 

Public Attributes

JMotorDriverAvrPWM pwmDriverPos
 
JMotorDriverAvrPWM pwmDriverNeg
 
bool reverse
 

Constructor & Destructor Documentation

◆ JMotorDriverAvrHBridge()

JMotorDriverAvrHBridge::JMotorDriverAvrHBridge ( byte  _pinPos,
byte  _pinNeg,
bool  _reverse = false 
)
inline

Member Function Documentation

◆ getEnable()

bool JMotorDriverAvrHBridge::getEnable ( )
inlinevirtual

get the enable state of the driver

Return values
(bool)true if enabled, false if disabled

Reimplemented from JMotorDriver.

◆ getMaxRange()

float JMotorDriverAvrHBridge::getMaxRange ( )
inlinevirtual

high end of the range

Note
usually 1.0
Return values
(float)maxRange

Reimplemented from JMotorDriver.

◆ getMinRange()

float JMotorDriverAvrHBridge::getMinRange ( )
inlinevirtual

low end of the range

Note
usually -1.0, if 0, that indicates a motor controller with no reverse function
Return values
(float)minRange

Reimplemented from JMotorDriver.

◆ set()

bool JMotorDriverAvrHBridge::set ( float  val)
inlinevirtual

set motor power

Note
val should be between getMinRange and getMaxRange, but constrained internally
Parameters
val(float) val
Return values
(bool)false if at end of power range, true otherwise

Reimplemented from JMotorDriver.

◆ setEnable()

bool JMotorDriverAvrHBridge::setEnable ( bool  _enable)
inlinevirtual

use to enable or disable a motor, and sets up pin states

Note
setEnable(true) must be called before a motor driver will activate
Parameters
_enable(bool) true=enable, false=disable
Return values
(bool)true if state changed, false if state already set

Reimplemented from JMotorDriver.

Member Data Documentation

◆ pwmDriverNeg

JMotorDriverAvrPWM JMotorDriverAvrHBridge::pwmDriverNeg

◆ pwmDriverPos

JMotorDriverAvrPWM JMotorDriverAvrHBridge::pwmDriverPos

◆ reverse

bool JMotorDriverAvrHBridge::reverse

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