init branch
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / Robot.java
CommitLineData
38a404b3
KZ
1package org.usfirst.frc.team3501.robot;
2
cca02549 3import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
6f3b6d29 4import org.usfirst.frc.team3501.robot.subsystems.Intake;
079a8cb6 5import org.usfirst.frc.team3501.robot.subsystems.Shooter;
6acd1f1b 6
38a404b3
KZ
7import edu.wpi.first.wpilibj.IterativeRobot;
8import edu.wpi.first.wpilibj.command.Scheduler;
9
10public class Robot extends IterativeRobot {
6acd1f1b 11 private static DriveTrain driveTrain;
414d5638 12 private static Shooter shooter;
6acd1f1b 13 private static OI oi;
6f3b6d29 14 private static Intake intake;
5e270352 15 // init
38a404b3
KZ
16
17 @Override
18 public void robotInit() {
6acd1f1b
CZ
19 driveTrain = DriveTrain.getDriveTrain();
20 oi = OI.getOI();
079a8cb6 21 shooter = Shooter.getShooter();
6f3b6d29 22 intake = Intake.getIntake();
8565f615 23
cca02549 24 }
6acd1f1b
CZ
25
26 public static DriveTrain getDriveTrain() {
27 return DriveTrain.getDriveTrain();
cca02549 28 }
6acd1f1b 29
414d5638 30 public static Shooter getShooter() {
31 return Shooter.getShooter();
32 }
33
6acd1f1b
CZ
34 public static OI getOI() {
35 return OI.getOI();
38a404b3
KZ
36 }
37
6f3b6d29 38 public static Intake getIntake() {
7992f152
AD
39 return Intake.getIntake();
40 }
41
538715b1
AD
42 // If the gear values do not match in the left and right piston, then they are
43 // both set to high gear
38a404b3
KZ
44 @Override
45 public void autonomousInit() {
202468a5 46 driveTrain.setHighGear();
38a404b3
KZ
47 }
48
49 @Override
50 public void autonomousPeriodic() {
51 Scheduler.getInstance().run();
52
53 }
54
55 @Override
56 public void teleopInit() {
538715b1 57
38a404b3
KZ
58 }
59
60 @Override
61 public void teleopPeriodic() {
62 Scheduler.getInstance().run();
63
64 }
65}