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 | |
9ea6a533 ME |
29 | cameraFeeds = CameraFeeds.getCameraFeeds(); |
30 | ||
5bee67e1 | 31 | // usbCamera = CameraServer.getInstance().startAutomaticCapture(); |
b29faa06 | 32 | |
b90bdbe6 RH |
33 | // cameraServer2 = CameraServer;getInstance(); |
34 | // axisCamera = cameraServer2.addAxisCamera("axisCamera", "10.35.1.11"); | |
35 | ||
9ea6a533 ME |
36 | // cameraServer2 = CameraServer.getInstance(); |
37 | // axisCamera = cameraServer2.addAxisCamera("axisCamera", "10.35.1.11"); | |
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"); | |
72beefff | 43 | |
50a075d8 RH |
44 | // cameraFeeds = new CameraFeeds(); |
45 | ||
cca02549 | 46 | } |
6acd1f1b CZ |
47 | |
48 | public static DriveTrain getDriveTrain() { | |
49 | return DriveTrain.getDriveTrain(); | |
cca02549 | 50 | } |
6acd1f1b | 51 | |
414d5638 | 52 | public static Shooter getShooter() { |
53 | return Shooter.getShooter(); | |
54 | } | |
55 | ||
9ea6a533 ME |
56 | public static CameraFeeds getCameraFeeds() { |
57 | return cameraFeeds; | |
58 | } | |
59 | ||
6acd1f1b CZ |
60 | public static OI getOI() { |
61 | return OI.getOI(); | |
38a404b3 KZ |
62 | } |
63 | ||
6f3b6d29 | 64 | public static Intake getIntake() { |
7992f152 AD |
65 | return Intake.getIntake(); |
66 | } | |
67 | ||
538715b1 AD |
68 | // If the gear values do not match in the left and right piston, then they are |
69 | // both set to high gear | |
38a404b3 KZ |
70 | @Override |
71 | public void autonomousInit() { | |
202468a5 | 72 | driveTrain.setHighGear(); |
38a404b3 KZ |
73 | } |
74 | ||
75 | @Override | |
76 | public void autonomousPeriodic() { | |
77 | Scheduler.getInstance().run(); | |
78 | ||
79 | } | |
80 | ||
81 | @Override | |
82 | public void teleopInit() { | |
538715b1 | 83 | |
38a404b3 KZ |
84 | } |
85 | ||
86 | @Override | |
87 | public void teleopPeriodic() { | |
88 | Scheduler.getInstance().run(); | |
89 | ||
90 | } | |
91 | } |