make so does not crash
[3501/3501-spark-go] / src / org / usfirst / frc / team3501 / bases / Command.java
1 package org.usfirst.frc.team3501.bases;
2
3 import org.usfirst.frc.team3501.robot.OI;
4 import org.usfirst.frc.team3501.robot.Robot;
5 import org.usfirst.frc.team3501.robot.subsystems.Arm;
6 import org.usfirst.frc.team3501.robot.subsystems.Claw;
7 import org.usfirst.frc.team3501.robot.subsystems.Drivetrain;
8 import org.usfirst.frc.team3501.robot.subsystems.Pneumatics;
9 import org.usfirst.frc.team3501.util.AutonData;
10
11 import edu.wpi.first.wpilibj.command.Scheduler;
12
13 public abstract class Command
14 extends edu.wpi.first.wpilibj.command.Command {
15
16 protected static OI oi;
17
18 protected static AutonData autonData;
19
20 protected static Drivetrain drivetrain;
21 protected static Arm arm;
22 protected static Claw claw;
23
24 protected static Pneumatics pneumatics;
25
26 public Command(String commandName) {
27 super(commandName);
28
29 oi = Robot.oi;
30
31 autonData = Robot.autonData;
32
33 drivetrain = Robot.drivetrain;
34 arm = Robot.arm;
35 claw = Robot.claw;
36
37 pneumatics = Robot.pneumatics;
38 }
39
40 protected void schedule(Command c) {
41 Scheduler.getInstance().add(c);
42 }
43
44 protected void initialize() {}
45
46 protected void execute() {}
47
48 protected void end() {}
49
50 protected void interrupted() {}
51 }