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