testing TimeDrive
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / Robot.java
1 package org.usfirst.frc.team3501.robot;
2
3 import org.usfirst.frc.team3501.robot.commands.driving.TimeDrive;
4 import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
5
6 import edu.wpi.first.wpilibj.IterativeRobot;
7 import edu.wpi.first.wpilibj.command.Scheduler;
8
9 public class Robot extends IterativeRobot {
10 private static DriveTrain driveTrain;
11 private static OI oi;
12
13 @Override
14 public void robotInit() {
15 driveTrain = DriveTrain.getDriveTrain();
16 oi = OI.getOI();
17 }
18
19 public static DriveTrain getDriveTrain() {
20 return DriveTrain.getDriveTrain();
21 }
22
23 public static OI getOI() {
24 return OI.getOI();
25 }
26
27 @Override
28 public void autonomousInit() {
29 Scheduler.getInstance().add(new TimeDrive(1.5, 0.4));
30 }
31
32 @Override
33 public void autonomousPeriodic() {
34 Scheduler.getInstance().run();
35
36 }
37
38 @Override
39 public void teleopInit() {
40 }
41
42 @Override
43 public void teleopPeriodic() {
44 Scheduler.getInstance().run();
45
46 }
47 }