View Single Post
  #9   Spotlight this post!  
Unread 13-02-2014, 20:00
irvingc irvingc is offline
Registered User
FRC #0948 (Newport Robotics Group)
Team Role: Leadership
 
Join Date: Jan 2014
Rookie Year: 2011
Location: Bellevue, WA
Posts: 31
irvingc is on a distinguished road
Re: Using Coniditionals to Build Custom Command Groups

Quote:
Originally Posted by Ginto8 View Post
My team created a class just for this purpose here. To use it:
Code:
addSequential(new Conditional(<Command for true>,<Command for false>) {
    protected boolean condition() {
        return <condition>;
    }
});
<Command for true> and <Command for false> can be any command, or null if you want nothing to run in that case.
Have you tested your full autonomous sequence to be working using this Conditional command? My experience is that this pattern (a Command that instantiates and then .start()s another Command) does not work as intended.
Reply With Quote