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