This is a object orinted PID loop that can be applied to drivetrains.
All classes are in the PID namespace
You Need to call loop() like vex::task pidLoop(PODOBJECT.loop);
PID(double P, double I, double D, motor_group PID_Motor);
Initialize a PID instance with the kP, kI, and kD you want and it takes either a motor_group of motor object
DrivePID(double P, double I, double D, double turnP, double turnI, double turnD, motor_group left, motor_group right, inertial turnIntertial, double wheelDiameter, int sleep(Optional));
Drive PID is the lateral motion PID set up for turning and forward and backward movement
enable();
orOBJECT.enabled = true;
Enable the PID(Loop has to be running)
disable()
orOBJECT.enabled = false;
Disable the PID(Will stop PID loop)
reset()
orOBJECT.resetEncoder = true;
(PID::PID
) orOBJECT.resetSensors = true;
(PID::DrivePID
)
Disable the PID(Will stop PID loop)
move(double distance)
orOBJECT.desiredValue = true
Set the desired value for the PID loop