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 | |
5d967c55 CZ |
7 | import edu.wpi.cscore.UsbCamera; |
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; |
38a404b3 KZ |
17 | |
18 | @Override | |
19 | public void robotInit() { | |
6acd1f1b CZ |
20 | driveTrain = DriveTrain.getDriveTrain(); |
21 | oi = OI.getOI(); | |
079a8cb6 | 22 | shooter = Shooter.getShooter(); |
6f3b6d29 | 23 | intake = Intake.getIntake(); |
5d967c55 CZ |
24 | CameraServer server = CameraServer.getInstance(); |
25 | UsbCamera climberCam = server.startAutomaticCapture("climbercam", 0); | |
26 | UsbCamera intakeCam = server.startAutomaticCapture("intakecam", 1); | |
cca02549 | 27 | } |
6acd1f1b CZ |
28 | |
29 | public static DriveTrain getDriveTrain() { | |
30 | return DriveTrain.getDriveTrain(); | |
cca02549 | 31 | } |
6acd1f1b | 32 | |
414d5638 | 33 | public static Shooter getShooter() { |
34 | return Shooter.getShooter(); | |
35 | } | |
36 | ||
6acd1f1b CZ |
37 | public static OI getOI() { |
38 | return OI.getOI(); | |
38a404b3 KZ |
39 | } |
40 | ||
6f3b6d29 | 41 | public static Intake getIntake() { |
7992f152 AD |
42 | return Intake.getIntake(); |
43 | } | |
44 | ||
538715b1 AD |
45 | // If the gear values do not match in the left and right piston, then they are |
46 | // both set to high gear | |
38a404b3 KZ |
47 | @Override |
48 | public void autonomousInit() { | |
202468a5 | 49 | driveTrain.setHighGear(); |
38a404b3 KZ |
50 | } |
51 | ||
52 | @Override | |
53 | public void autonomousPeriodic() { | |
54 | Scheduler.getInstance().run(); | |
38a404b3 KZ |
55 | } |
56 | ||
57 | @Override | |
58 | public void teleopInit() { | |
538715b1 | 59 | |
38a404b3 KZ |
60 | } |
61 | ||
62 | @Override | |
63 | public void teleopPeriodic() { | |
88ecb8d3 | 64 | Scheduler.getInstance().run(); |
38a404b3 KZ |
65 | } |
66 | } |