testing TimeDrive
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / Robot.java
index 36ca70bc268a526c02d33f5531c1d8d550fcbe90..8e98834a47f60a7d2e50b9f4b12d9a31b934afea 100644 (file)
@@ -1,21 +1,32 @@
 package org.usfirst.frc.team3501.robot;
 
-import org.usfirst.frc.team3501.robot.Constants.DriveTrain;
+import org.usfirst.frc.team3501.robot.commands.driving.TimeDrive;
+import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
+
 import edu.wpi.first.wpilibj.IterativeRobot;
 import edu.wpi.first.wpilibj.command.Scheduler;
 
 public class Robot extends IterativeRobot {
-  public static OI oi;
-  public static DriveTrain driveTrain;
+  private static DriveTrain driveTrain;
+  private static OI oi;
 
   @Override
   public void robotInit() {
-    driveTrain = new DriveTrain();
-    oi = new OI();
+    driveTrain = DriveTrain.getDriveTrain();
+    oi = OI.getOI();
+  }
+
+  public static DriveTrain getDriveTrain() {
+    return DriveTrain.getDriveTrain();
+  }
+
+  public static OI getOI() {
+    return OI.getOI();
   }
 
   @Override
   public void autonomousInit() {
+    Scheduler.getInstance().add(new TimeDrive(1.5, 0.4));
   }
 
   @Override