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