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