7678a7289cc4506c66670c42418b5292fa9a0ef5
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / Robot.java
1 package org.usfirst.frc.team3501.robot;
2
3 import org.usfirst.frc.team3501.robot.commands.driving.SetLowGear;
4 import org.usfirst.frc.team3501.robot.commands.intakearm.MoveIntakeArm;
5 import org.usfirst.frc.team3501.robot.commands.shooter.ResetCatapult;
6 import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
7 import org.usfirst.frc.team3501.robot.subsystems.IntakeArm;
8 import org.usfirst.frc.team3501.robot.subsystems.Shooter;
9
10 import edu.wpi.first.wpilibj.IterativeRobot;
11 import edu.wpi.first.wpilibj.command.Scheduler;
12
13 public class Robot extends IterativeRobot {
14 public static OI oi;
15 public static DriveTrain driveTrain;
16 public static Shooter shooter;
17 public static IntakeArm intakeArm;
18
19 @Override
20 public void robotInit() {
21 driveTrain = new DriveTrain();
22 shooter = new Shooter();
23 intakeArm = new IntakeArm();
24
25 oi = new OI();
26 }
27
28 @Override
29 public void autonomousInit() {
30 Scheduler.getInstance().run();
31 }
32
33 @Override
34 public void autonomousPeriodic() {
35 Scheduler.getInstance().run();
36 }
37
38 @Override
39 public void teleopInit() {
40 Scheduler.getInstance().add(new SetLowGear()); // Start each match in low
41 // gear
42 Scheduler.getInstance().add(new ResetCatapult()); // Reset catapult at start
43 // of each match.
44
45 Scheduler.getInstance().add(new MoveIntakeArm(Constants.IntakeArm.EXTEND));
46 // Start testing with intake arm extended TODO remove this
47 }
48
49 @Override
50 public void teleopPeriodic() {
51 Scheduler.getInstance().run();
52 }
53
54 }