public Drive(DriveGearbox motors) { super(); this.motors = motors; leftEncoder = new RelativeEncoder(motors.getLeftEncoder()); rightEncoder = new RelativeEncoder(motors.getRightEncoder()); leftEncoder.start(); rightEncoder.start(); disableControllers(); }
public void resetEncoders() { motors.getLeftEncoder().reset(); motors.getRightEncoder().reset(); leftEncoder.reset(); rightEncoder.reset(); }
public double getRightEncoderDistance() { return rightEncoder.get() / 256.0 * 3.5 * Math.PI; }
public double getLeftEncoderDistance() { return leftEncoder.get() / 256.0 * 3.5 * Math.PI; }