Hey, so I’ve created a class that extends PIDSubsystem that’s set up with an encoder. How would I actually use it? The class is for an elevator so how would I tell it to go up by X encoder ticks?
Code:
public class Elevator extends PIDSubsystem {
public Elevator() {
super("elevator", 1,1,1,0);
}
@Override
protected double returnPIDInput() {
return robotMap.enc.get();
}
@Override
protected void usePIDOutput(double output) {
robotMap.manipulatorA.pidWrite(output);
}
@Override
protected void initDefaultCommand() {
}
}
Also please tell me if anything is missing from my PIDSubsystem class
Thanks