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