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