JMotor
Loading...
Searching...
No Matches
JDrivetrainBasic.h
Go to the documentation of this file.
1#ifndef J_DRIVETRAIN_BASIC_H
2#define J_DRIVETRAIN_BASIC_H
3#include "JTwoDTransform.h"
4#include <Arduino.h>
9public:
13 virtual void run() = 0;
19 virtual bool setEnable(bool _enable) = 0;
24 virtual bool enable() = 0;
29 virtual bool disable() = 0;
34 virtual bool getEnable() = 0;
41 virtual void setVel(JTwoDTransform _vel, bool _run = false) = 0;
48};
49#endif // J_DRIVETRAIN_BASIC_H
interface for a drivetrain with only simple velocity control
Definition JDrivetrainBasic.h:8
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 bool enable()=0
enables movement
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 JTwoDTransform getMaxVel()=0
returns the approximate maximum velocity of the drivetrain, if the drivetrain is told to move at max ...
virtual bool disable()=0
disables movement
struct for storing a 2 dimensional transformation. Used for telling a drivetrain how to move.
Definition JTwoDTransform.h:9