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

defines interface for controlling any ground-based drivetrain More...

#include <JDrivetrain.h>

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

Public Member Functions

virtual JTwoDTransform getVel (bool _run=false)
 
virtual JTwoDTransform getDist (bool _run=false)
 
virtual void setDistSetpoint (JTwoDTransform _dist, bool _run=false)
 
virtual void setDistDelta (JTwoDTransform _dist, bool _run=false)
 
virtual void resetDist ()
 
virtual void setMotorVel (float vel, unsigned char i, bool _run=false)
 
virtual void setMotorDistSetpoint (float distSetpoint, unsigned char i, bool _run=false)
 
virtual void setMotorDistDelta (float distDelta, unsigned char i, bool _run=false)
 
virtual float getMotorVel (unsigned char i)
 
virtual unsigned char getNumberMotors ()
 
- Public Member Functions inherited from JDrivetrainBasic
virtual void run ()=0
 call this in loop. it calls any encoder or motor update functions
 
virtual bool setEnable (bool _enable)=0
 enables or disables movement
 
virtual bool enable ()=0
 enables movement
 
virtual bool disable ()=0
 disables movement
 
virtual bool getEnable ()=0
 gets the current state (enabled or disabled)
 
virtual void setVel (JTwoDTransform _vel, bool _run=false)=0
 sets a velocity for the drivetrain to move at
 
virtual JTwoDTransform getMaxVel ()=0
 returns the approximate maximum velocity of the drivetrain, if the drivetrain is told to move at max velocity, it should set the motors to full power.
 

Detailed Description

defines interface for controlling any ground-based drivetrain

Member Function Documentation

◆ getDist()

virtual JTwoDTransform JDrivetrain::getDist ( bool  _run = false)
virtual

◆ getMotorVel()

virtual float JDrivetrain::getMotorVel ( unsigned char  i)
virtual

◆ getNumberMotors()

virtual unsigned char JDrivetrain::getNumberMotors ( )
virtual

◆ getVel()

virtual JTwoDTransform JDrivetrain::getVel ( bool  _run = false)
virtual

◆ resetDist()

virtual void JDrivetrain::resetDist ( )
virtual

◆ setDistDelta()

virtual void JDrivetrain::setDistDelta ( JTwoDTransform  _dist,
bool  _run = false 
)
virtual

◆ setDistSetpoint()

virtual void JDrivetrain::setDistSetpoint ( JTwoDTransform  _dist,
bool  _run = false 
)
virtual

◆ setMotorDistDelta()

virtual void JDrivetrain::setMotorDistDelta ( float  distDelta,
unsigned char  i,
bool  _run = false 
)
virtual

◆ setMotorDistSetpoint()

virtual void JDrivetrain::setMotorDistSetpoint ( float  distSetpoint,
unsigned char  i,
bool  _run = false 
)
virtual

◆ setMotorVel()

virtual void JDrivetrain::setMotorVel ( float  vel,
unsigned char  i,
bool  _run = false 
)
virtual

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