1#ifndef J_CONTROL_LOOP_BASIC_H
2#define J_CONTROL_LOOP_BASIC_H
simple control loop for use with JMotorControllerClosed, can turn off motor if nothing has moved for ...
Definition JControlLoopBasic.h:7
float getKP()
Definition JControlLoopBasic.h:57
bool noReverseVoltage
Definition JControlLoopBasic.h:12
unsigned long getTimeout()
Definition JControlLoopBasic.h:65
void setKP(float _p)
Definition JControlLoopBasic.h:53
float P
Definition JControlLoopBasic.h:9
void setTimeout(unsigned long _timeout)
Definition JControlLoopBasic.h:61
JControlLoopBasic(float kP, unsigned long _timeout=0, bool _noReverseVoltage=false)
constructor for control loop for use with JMotorControllerClosed
Definition JControlLoopBasic.h:21
unsigned long timeout
Definition JControlLoopBasic.h:10
unsigned long lastMovedMillis
Definition JControlLoopBasic.h:11
void resetTime()
Definition JControlLoopBasic.h:69
float calc(JMotorControllerClosed *controller)
Definition JControlLoopBasic.h:28
interface for control loop used by JMotorControllerClosed
Definition JControlLoop.h:7
float error
Definition JControlLoop.h:9
float ctrlLoopOut
Definition JControlLoop.h:10
float result
Definition JControlLoop.h:11
closed loop (uses encoder) motor controller
Definition JMotorControllerClosed.h:13
float getPos()
get what position the motor is currently at
Definition JMotorControllerClosed.h:348
float getPosSetpoint()
get position controller is currently trying to get to
Definition JMotorControllerClosed.h:297
float getDistFromSetpointLimit()
Definition JMotorControllerClosed.h:325
float getVel()
get current velocity of motor
Definition JMotorControllerClosed.h:344
float getPosDeltaSetpoint()
Definition JMotorControllerClosed.h:310
float getMinVel()
slowest speed motor can go
Definition JMotorControllerClosed.h:459