DCAITI Robot Hardware  1.0
Public Member Functions | List of all members
GearedMotor Class Reference

#include <MotorWheel.h>

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

Public Member Functions

 GearedMotor (unsigned char _pinPWM, unsigned char _pinDir, unsigned char _pinIRQ, unsigned char _pinIRQB, struct ISRVars *_isr, unsigned int _ratio=REDUCTION_RATIO)
 
float getGearedSpeedRPM () const
 
float setGearedSpeedRPM (float gearedSpeedRPM, bool dir)
 
float setGearedSpeedRPM (float gearedSpeedRPM)
 
unsigned int getRatio () const
 
unsigned int setRatio (unsigned int ratio=REDUCTION_RATIO)
 
float getPosition ()
 
- Public Member Functions inherited from Motor
 Motor (unsigned char _pinPWM, unsigned char _pinDir, unsigned char _pinIRQ, unsigned char _pinIRQB, struct ISRVars *_isr)
 
void setupInterrupt ()
 
unsigned char getPinPWM () const
 
unsigned char getPinDir () const
 
unsigned char getPinIRQ () const
 
unsigned char getPinIRQB () const
 
unsigned int runPWM (unsigned int PWM, bool dir, bool saveDir=true)
 
unsigned int getPWM () const
 
unsigned int advancePWM (unsigned int PWM)
 
unsigned int backoffPWM (unsigned int PWM)
 
bool setDesiredDir (bool dir)
 
bool getDesiredDir () const
 
bool reverseDesiredDir ()
 
bool setCurrDir ()
 
bool getCurrDir () const
 
int getSpeedRPM () const
 
unsigned int setSpeedRPM (int speedRPM, bool dir)
 
int setSpeedRPM (int speedRPM)
 
bool PIDSetup (float kc=KC, float taui=TAUI, float taud=TAUD, unsigned int sampleTime=1000)
 
bool PIDGetStatus () const
 
bool PIDEnable (float kc=KC, float taui=TAUI, float taud=TAUD, unsigned int sampleTime=1000)
 
bool PIDDisable ()
 
bool PIDReset ()
 
bool PIDRegulate (bool doRegulate=true)
 
unsigned int PIDSetSpeedRPMDesired (unsigned int speedRPM)
 
unsigned int PIDGetSpeedRPMDesired () const
 
void delayMS (unsigned int ms, bool debug=false)
 
void debugger () const
 
int getSpeedPPS () const
 
long getCurrPulse () const
 
long setCurrPulse (long _pulse)
 
long resetCurrPulse ()
 
- Public Member Functions inherited from PID
 PID (int *, int *, int *, float, float, float)
 
 PID (int *, int *, int *, int *, float, float, float)
 
void SetMode (int Mode)
 
void Compute ()
 
void SetInputLimits (int, int)
 
void SetOutputLimits (int, int)
 
void SetTunings (float, float, float)
 
void SetSampleTime (int)
 
void Reset ()
 
bool JustCalculated ()
 
int GetMode ()
 
int GetINMin ()
 
int GetINMax ()
 
int GetOUTMin ()
 
int GetOUTMax ()
 
int GetSampleTime ()
 
float GetP_Param ()
 
float GetI_Param ()
 
float GetD_Param ()
 

Additional Inherited Members

- Public Attributes inherited from Motor
struct ISRVarsisr
 

Constructor & Destructor Documentation

◆ GearedMotor()

GearedMotor::GearedMotor ( unsigned char  _pinPWM,
unsigned char  _pinDir,
unsigned char  _pinIRQ,
unsigned char  _pinIRQB,
struct ISRVars _isr,
unsigned int  _ratio = REDUCTION_RATIO 
)

Member Function Documentation

◆ getGearedSpeedRPM()

float GearedMotor::getGearedSpeedRPM ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPosition()

float GearedMotor::getPosition ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRatio()

unsigned int GearedMotor::getRatio ( ) const
Here is the caller graph for this function:

◆ setGearedSpeedRPM() [1/2]

float GearedMotor::setGearedSpeedRPM ( float  gearedSpeedRPM)
Here is the call graph for this function:

◆ setGearedSpeedRPM() [2/2]

float GearedMotor::setGearedSpeedRPM ( float  gearedSpeedRPM,
bool  dir 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRatio()

unsigned int GearedMotor::setRatio ( unsigned int  ratio = REDUCTION_RATIO)
Here is the call graph for this function:

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