Commit | Line | Data |
---|---|---|
38a404b3 KZ |
1 | package org.usfirst.frc.team3501.robot; |
2 | ||
cca02549 | 3 | import org.usfirst.frc.team3501.robot.subsystems.DriveTrain; |
6f3b6d29 | 4 | import org.usfirst.frc.team3501.robot.subsystems.Intake; |
079a8cb6 | 5 | import org.usfirst.frc.team3501.robot.subsystems.Shooter; |
6acd1f1b | 6 | |
b90bdbe6 | 7 | import edu.wpi.cscore.AxisCamera; |
b90bdbe6 | 8 | import edu.wpi.first.wpilibj.CameraServer; |
38a404b3 KZ |
9 | import edu.wpi.first.wpilibj.IterativeRobot; |
10 | import edu.wpi.first.wpilibj.command.Scheduler; | |
11 | ||
12 | public 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 | |
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 | ||
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"); | |
43 | // cameraFeeds = new CameraFeeds(); | |
44 | ||
cca02549 | 45 | } |
6acd1f1b CZ |
46 | |
47 | public static DriveTrain getDriveTrain() { | |
48 | return DriveTrain.getDriveTrain(); | |
cca02549 | 49 | } |
6acd1f1b | 50 | |
414d5638 | 51 | public static Shooter getShooter() { |
52 | return Shooter.getShooter(); | |
53 | } | |
54 | ||
6acd1f1b CZ |
55 | public static OI getOI() { |
56 | return OI.getOI(); | |
38a404b3 KZ |
57 | } |
58 | ||
6f3b6d29 | 59 | public static Intake getIntake() { |
7992f152 AD |
60 | return Intake.getIntake(); |
61 | } | |
62 | ||
538715b1 AD |
63 | // If the gear values do not match in the left and right piston, then they are |
64 | // both set to high gear | |
38a404b3 KZ |
65 | @Override |
66 | public void autonomousInit() { | |
202468a5 | 67 | driveTrain.setHighGear(); |
38a404b3 KZ |
68 | } |
69 | ||
70 | @Override | |
71 | public void autonomousPeriodic() { | |
72 | Scheduler.getInstance().run(); | |
73 | ||
74 | } | |
75 | ||
76 | @Override | |
77 | public void teleopInit() { | |
538715b1 | 78 | |
1cac6c82 | 79 | cameraFeeds.init(); |
0c746368 | 80 | |
38a404b3 KZ |
81 | } |
82 | ||
83 | @Override | |
84 | public void teleopPeriodic() { | |
85 | Scheduler.getInstance().run(); | |
e183f274 | 86 | |
38a404b3 KZ |
87 | |
88 | } | |
89 | } |