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