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