Example #1
0
 public void turnStart(double degrees) {
   turnPID.reset();
   gyro.reset();
   turnPID.setSetpoint(degrees);
   turnPID.enable();
   Timer.delay(.1);
   System.out.println(
       "start turning from " + RobotMap.roundtoTwo(gyro.getAngle()) + " to setpoint " + degrees);
 }
Example #2
0
 public void setDistanceSetpoint(double inches) {
   distPID.setSetpoint(inches);
 }
Example #3
0
 public void distStart(double inches) {
   distPID.setSetpoint(inches);
   distPID.enable();
 }
Example #4
0
 public void setTurnSetpoint(double degrees) {
   turnPID.setSetpoint(degrees);
 }
 /**
  * Sets the setpoint to the given value. If {@link PIDCommand#setRange(double, double)
  * setRange(...)} was called, then the given setpoint will be trimmed to fit within the range.
  *
  * @param setpoint the new setpoint
  */
 protected void setSetpoint(double setpoint) {
   controller.setSetpoint(setpoint);
 }