Skip to content

Commit fbf0c11

Browse files
committed
Rename ExecuteDoubleMacro
1 parent ab2d7a7 commit fbf0c11

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/org/usfirst/frc/team226/robot/Robot.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ public void robotInit() {
5555
intake = new Intake();
5656
oi = new OI();
5757
chooser.addDefault("Baseline Cross", new ExecuteMacro("baseline"));
58-
chooser.addObject("Left Switch", new ExecuteDoubleMacro("left", "baseline"));
59-
chooser.addObject("Center Switch", new ExecuteDoubleMacro("centerswitch_left", "centerswitch_right"));
60-
chooser.addObject("Right Switch", new ExecuteDoubleMacro("baseline", "rightswitch_right"));
58+
chooser.addObject("Left Switch", new ExecuteChoiceMacro("leftswitch_left", "baseline"));
59+
chooser.addObject("Center Switch", new ExecuteChoiceMacro("centerswitch_left", "centerswitch_right"));
60+
chooser.addObject("Right Switch", new ExecuteChoiceMacro("baseline", "rightswitch_right"));
6161
SmartDashboard.putData("Auto mode", chooser);
6262

6363
SmartDashboard.putData(new PS_ShiftDriveTrainHighGear());

src/org/usfirst/frc/team226/robot/auton/ExecuteDoubleMacro.java renamed to src/org/usfirst/frc/team226/robot/auton/ExecuteChoiceMacro.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/**
1616
*
1717
*/
18-
public class ExecuteDoubleMacro extends Command {
18+
public class ExecuteChoiceMacro extends Command {
1919

2020
private String leftName;
2121
private String rightName;
@@ -24,7 +24,7 @@ public class ExecuteDoubleMacro extends Command {
2424

2525
private TalonSRX[] talons = Robot.driveTrain.getMotionProfileTalons();
2626

27-
public ExecuteDoubleMacro(String leftName, String rightName) {
27+
public ExecuteChoiceMacro(String leftName, String rightName) {
2828
// Use requires() here to declare subsystem dependencies
2929
// eg. requires(chassis);
3030
requires(Robot.driveTrain);
@@ -61,7 +61,7 @@ protected void execute() {
6161

6262
// Make this return true when this Command no longer needs to run execute()
6363
protected boolean isFinished() {
64-
return false;
64+
return profileToExecute.isFinished() && actionListToExecute.isFinished();
6565
}
6666

6767
// Called once after isFinished returns true

0 commit comments

Comments
 (0)