JMotor
|
interface for a drivetrain with only simple velocity control More...
#include <JDrivetrainBasic.h>
Public Member Functions | |
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. | |
interface for a drivetrain with only simple velocity control
|
pure virtual |
disables movement
did | the state change |
Implemented in JDrivetrainFieldOriented, JDrivetrainMecanum, JDrivetrainSwerve< N >, JDrivetrainTwoSide, and JDrivetrainControllerBasic.
|
pure virtual |
enables movement
did | the state change |
Implemented in JDrivetrainFieldOriented, JDrivetrainMecanum, JDrivetrainSwerve< N >, JDrivetrainTwoSide, and JDrivetrainControllerBasic.
|
pure virtual |
gets the current state (enabled or disabled)
(bool) | true=enabled false=movement disabled |
Implemented in JDrivetrainFieldOriented, JDrivetrainMecanum, JDrivetrainSwerve< N >, JDrivetrainTwoSide, and JDrivetrainControllerBasic.
|
pure virtual |
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.
(JTwoDTransform) | maximum velocity (in whatever units your drivetrain and motors are set up for) |
Implemented in JDrivetrainFieldOriented, JDrivetrainMecanum, JDrivetrainTwoSide, and JDrivetrainControllerBasic.
|
pure virtual |
call this in loop. it calls any encoder or motor update functions
Implemented in JDrivetrainFieldOriented, JDrivetrainMecanum, JDrivetrainSwerve< N >, JDrivetrainTwoSide, and JDrivetrainControllerBasic.
|
pure virtual |
enables or disables movement
_enable | (bool) true=enabled false=movement disabled |
did | the state change |
Implemented in JDrivetrainFieldOriented, JDrivetrainMecanum, JDrivetrainSwerve< N >, JDrivetrainTwoSide, and JDrivetrainControllerBasic.
|
pure virtual |
sets a velocity for the drivetrain to move at
_vel | (JTwoDTransform) velocity to move at |
_run | (bool, default=true) if true setVel will call run() for you, if false you must call it yourself |
None |
Implemented in JDrivetrainFieldOriented, JDrivetrainMecanum, JDrivetrainTwoSide, JDrivetrainControllerBasic, and JDrivetrainSwerve< N >.