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