Make SETPOINT variable get SmartDashboard's target dist option and pass that into...
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / Robot.java
index 14e655ade8f233569b42e3003e12b3ad5e176296..bff0bb410d94dbf23b77cdd6ebc1e1f8cadbce14 100644 (file)
@@ -84,32 +84,6 @@ public class Robot extends IterativeRobot {
   public void autonomousPeriodic() {
     Scheduler.getInstance().run();
 
-    DriveTrain.getDriveTrain().getDriveController().setConstants(p, i, d);
-
-    double driveP = SmartDashboard.getNumber(Constants.DriveTrain.DRIVE_D_Val,
-        Constants.DriveTrain.PID_ERROR);
-    double driveI = SmartDashboard.getNumber(Constants.DriveTrain.DRIVE_I_Val,
-        Constants.DriveTrain.PID_ERROR);
-    double driveD = SmartDashboard.getNumber(Constants.DriveTrain.DRIVE_D_Val,
-        Constants.DriveTrain.PID_ERROR);
-
-    double gyroP = SmartDashboard.getNumber(Constants.DriveTrain.GYRO_P_Val,
-        Constants.DriveTrain.PID_ERROR);
-    double gyroI = SmartDashboard.getNumber(Constants.DriveTrain.GYRO_I_Val,
-        Constants.DriveTrain.PID_ERROR);
-    double gyroD = SmartDashboard.getNumber(Constants.DriveTrain.GYRO_D_Val,
-        Constants.DriveTrain.PID_ERROR);
-
-    driveTrain.getDriveController().setName("Drive");
-    driveTrain.getGyroController().setName("Gyro");
-
-    driveTrain.getDriveController().setConstants(driveP, driveI, driveD);
-
-    driveTrain.getGyroController().setConstants(gyroP, gyroI, gyroD);
-
-    // new DriveDistance(SETPOINT, SPEED).start();
-
-    // new TurnForAngle(0, Direction.FORWARD, 5).start();
   }
 
   @Override