I know I'm not OP, but I'm on his team - I'll show you specifically what we are doing:
We have a command group like so:
Code:
Grp1::Grp1() {
AddSequential(new Cmd1());
AddSequential(new Cmd2());
AddSequential(new Cmd3());
}
Which is called by a button in OI.cpp:
Code:
groupButton->WhenPressed(new Grp1());
However to speed things up, we can skip Cmd2 in Grp1 occasionally based off the state of the robot. This kind of thing would be nice:
Code:
Grp1::Grp1() {
AddSequential(new Cmd1());
if (!mDrivetrain->canSkip()) {
AddSequential(new Cmd2());
}
AddSequential(new Cmd3());
}
One of our mentors (that I think you know, Kyle

) suggested we just make 2 separate command groups, and then have the button press call a new Command, which in turn checks the robot's state and calls the appropriate group based off of that. I was just wondering if there are any cleaner solutions?