1#ifndef J_MOTOR_CONTROLLER_H
2#define J_MOTOR_CONTROLLER_H
35 virtual bool setPosDelta(
float _posDelta,
bool _run =
true,
bool _resetPos =
false) = 0;
This class defines a common interface for classes which control velocity of a motor controlled by a J...
Definition JMotorControllerBase.h:7
This class defines a common interface for classes which control velocity and position of a motor cont...
Definition JMotorController.h:8
virtual float resetPos()=0
reset what position the controller thinks it's in
virtual float getPos()=0
get what position the motor is currently at
virtual void setVelLimit(float _velLimit)=0
set maximum motor speed
virtual float getPosTarget()=0
get position set as target (for smoothed position setting mode)
virtual float getPosSetpoint()=0
get position controller is currently trying to get to
virtual bool setPosTarget(float _posTarget, bool _run=true)=0
set target position (motor drives towards position, following acceleration profile)
virtual bool setPosSetpoint(float _posSetpoint, bool _run=true)=0
set position for motor to drive towards position as fast as possible (setpoint for control loop if av...
virtual bool isPosModeNotVelocity()=0
true if controller is in position target mode, false if in velocity mode
virtual bool setPosDelta(float _posDelta, bool _run=true, bool _resetPos=false)=0
alternative method for setting velocity that uses setPosSetpoint