Add code for toggling camera, but took it off
[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;
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
b90bdbe6 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
cca02549 37 }
6acd1f1b
CZ
38
39 public static DriveTrain getDriveTrain() {
40 return DriveTrain.getDriveTrain();
cca02549 41 }
6acd1f1b 42
414d5638 43 public static Shooter getShooter() {
44 return Shooter.getShooter();
45 }
46
6acd1f1b
CZ
47 public static OI getOI() {
48 return OI.getOI();
38a404b3
KZ
49 }
50
6f3b6d29 51 public static Intake getIntake() {
7992f152
AD
52 return Intake.getIntake();
53 }
54
538715b1
AD
55 // If the gear values do not match in the left and right piston, then they are
56 // both set to high gear
38a404b3
KZ
57 @Override
58 public void autonomousInit() {
202468a5 59 driveTrain.setHighGear();
38a404b3
KZ
60 }
61
62 @Override
63 public void autonomousPeriodic() {
64 Scheduler.getInstance().run();
65
66 }
67
68 @Override
69 public void teleopInit() {
538715b1 70
38a404b3
KZ
71 }
72
73 @Override
74 public void teleopPeriodic() {
75 Scheduler.getInstance().run();
76
77 }
78}