View Single Post
  #4   Spotlight this post!  
Unread 22-02-2015, 18:58
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: Handling Exceptional Cases in a CommandGroup

Or in your Robot you can have an enum that is kind of like a Robot State, then in your commands in the isFinished method you can say

Code:
@Override
protected boolean isFinished() {
// TODO Auto-generated method stub
return (Normal End Condition) || Robot.RobotState != RunningCommandGroupX;
}
its also fairly common to have a state based robot or state based anything really. Lots of video games and Robots are state based.

ps. If you need more help on setting this up just Pm me, Ill be glad to help!
Reply With Quote