-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGreenLightCommand
47 lines (37 loc) · 1020 Bytes
/
GreenLightCommand
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package org.usfirst.frc.team6418.robot.commands;
import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team6418.robot.Robot;
/**
*
*/
public class GreenLight extends Command {
public GreenLight() {
// Use requires() here to declare subsystem dependencies
requires(Robot.greenlightsys); //define
}
// Called just before this Command runs the first time
@Override
protected void initialize() {
}
// Called repeatedly when this Command is scheduled to run
@Override
protected void execute() {
GreenLight gl = new Command();
gl.initDefaultCommand();
System.out.println("I am in GL command");
}
// Make this return true when this Command no longer needs to run execute()
@Override
protected boolean isFinished() {
return true;
}
// Called once after isFinished returns true
@Override
protected void end() {
}
// Called when another command which requires one or more of the same
// subsystems is scheduled to run
@Override
protected void interrupted() {
}
}