Instead of putting
Code:
joystickButtonA.whenPressed(new shiftDriveSpeed());
in init, make a function public OI in OI.
Code:
public OI(){
joystickButtonA.whenPressed(new shiftDriveSpeed());
}
Also, in shiftDriveSpeed, return true on isFinished or else it'll constantly shift.