Commiting so I can pull
[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;
6f3b6d29 4import org.usfirst.frc.team3501.robot.subsystems.Intake;
079a8cb6 5import org.usfirst.frc.team3501.robot.subsystems.Shooter;
6acd1f1b 6
b90bdbe6 7import edu.wpi.cscore.AxisCamera;
b90bdbe6 8import edu.wpi.first.wpilibj.CameraServer;
38a404b3
KZ
9import edu.wpi.first.wpilibj.IterativeRobot;
10import edu.wpi.first.wpilibj.command.Scheduler;
11
12public class Robot extends IterativeRobot {
6acd1f1b 13 private static DriveTrain driveTrain;
414d5638 14 private static Shooter shooter;
6acd1f1b 15 private static OI oi;
6f3b6d29 16 private static Intake intake;
50a075d8 17 // private static UsbCamera usbCamera;
b90bdbe6
RH
18 private static CameraServer cameraServer2;
19 private static AxisCamera axisCamera;
1cac6c82 20 private static CameraFeeds cameraFeeds;
38a404b3
KZ
21
22 @Override
23 public void robotInit() {
6acd1f1b
CZ
24 driveTrain = DriveTrain.getDriveTrain();
25 oi = OI.getOI();
079a8cb6 26 shooter = Shooter.getShooter();
6f3b6d29 27 intake = Intake.getIntake();
8565f615 28
5bee67e1 29 // usbCamera = CameraServer.getInstance().startAutomaticCapture();
b29faa06 30
b90bdbe6
RH
31 // cameraServer2 = CameraServer;getInstance();
32 // axisCamera = cameraServer2.addAxisCamera("axisCamera", "10.35.1.11");
33
b29faa06 34 cameraServer2 = CameraServer.getInstance();
35 axisCamera = cameraServer2.addAxisCamera("axisCamera", "10.35.1.11");
36
1cac6c82 37 cameraFeeds = new CameraFeeds();
50a075d8
RH
38
39 // usbCamera = CameraServer.getInstance().startAutomaticCapture();
40 // CameraServer.getInstance().startAutomaticCapture();
41 // cameraServer2 = CameraServer.getInstance();
42 // axisCamera = cameraServer2.addAxisCamera("axisCamera", "10.35.1.11");
72beefff 43
50a075d8
RH
44 // cameraFeeds = new CameraFeeds();
45
dd0b01ac 46 cameraFeeds = new CameraFeeds();
72beefff 47
cca02549 48 }
6acd1f1b
CZ
49
50 public static DriveTrain getDriveTrain() {
51 return DriveTrain.getDriveTrain();
cca02549 52 }
6acd1f1b 53
414d5638 54 public static Shooter getShooter() {
55 return Shooter.getShooter();
56 }
57
6acd1f1b
CZ
58 public static OI getOI() {
59 return OI.getOI();
38a404b3
KZ
60 }
61
6f3b6d29 62 public static Intake getIntake() {
7992f152
AD
63 return Intake.getIntake();
64 }
65
538715b1
AD
66 // If the gear values do not match in the left and right piston, then they are
67 // both set to high gear
38a404b3
KZ
68 @Override
69 public void autonomousInit() {
202468a5 70 driveTrain.setHighGear();
38a404b3
KZ
71 }
72
73 @Override
74 public void autonomousPeriodic() {
75 Scheduler.getInstance().run();
76
77 }
78
79 @Override
80 public void teleopInit() {
538715b1 81
1cac6c82 82 cameraFeeds.init();
0c746368 83
72beefff
RH
84 cameraFeeds.init();
85
38a404b3
KZ
86 }
87
88 @Override
89 public void teleopPeriodic() {
90 Scheduler.getInstance().run();
91
92 }
93}