50467045ab345c2baa5821ef041c20e67100e259
[3501/3501-spark-go] / src / org / usfirst / frc / team3501 / robot / commands / CommandBase.java
1 package org.usfirst.frc.team3501.robot.commands;
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.*;
6
7 import edu.wpi.first.wpilibj.command.Command;
8 import edu.wpi.first.wpilibj.command.Scheduler;
9
10 public abstract class CommandBase extends Command {
11
12 protected static OI oi;
13
14 protected static Drivetrain drivetrain;
15 protected static Arm arm;
16 protected static Claw claw;
17
18 protected static Pneumatics pneumatics;
19
20 public CommandBase(String commandName) {
21 super(commandName);
22
23 oi = Robot.oi;
24
25 drivetrain = Robot.drivetrain;
26 arm = Robot.arm;
27 claw = Robot.claw;
28
29 pneumatics = Robot.pneumatics;
30 }
31
32 protected void schedule(Command c) {
33 Scheduler.getInstance().add(c);
34 }
35
36 protected void initialize() {}
37
38 protected void execute() {}
39
40 protected void end() {}
41
42 protected void interrupted() {}
43 }