File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
src/org/usfirst/frc/team226/robot Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ public void robotInit() {
55
55
intake = new Intake ();
56
56
oi = new OI ();
57
57
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" ));
61
61
SmartDashboard .putData ("Auto mode" , chooser );
62
62
63
63
SmartDashboard .putData (new PS_ShiftDriveTrainHighGear ());
Original file line number Diff line number Diff line change 15
15
/**
16
16
*
17
17
*/
18
- public class ExecuteDoubleMacro extends Command {
18
+ public class ExecuteChoiceMacro extends Command {
19
19
20
20
private String leftName ;
21
21
private String rightName ;
@@ -24,7 +24,7 @@ public class ExecuteDoubleMacro extends Command {
24
24
25
25
private TalonSRX [] talons = Robot .driveTrain .getMotionProfileTalons ();
26
26
27
- public ExecuteDoubleMacro (String leftName , String rightName ) {
27
+ public ExecuteChoiceMacro (String leftName , String rightName ) {
28
28
// Use requires() here to declare subsystem dependencies
29
29
// eg. requires(chassis);
30
30
requires (Robot .driveTrain );
@@ -61,7 +61,7 @@ protected void execute() {
61
61
62
62
// Make this return true when this Command no longer needs to run execute()
63
63
protected boolean isFinished () {
64
- return false ;
64
+ return profileToExecute . isFinished () && actionListToExecute . isFinished () ;
65
65
}
66
66
67
67
// Called once after isFinished returns true
You can’t perform that action at this time.
0 commit comments