View Single Post
  #3   Spotlight this post!  
Unread 13-03-2015, 18:31
jfitz0807 jfitz0807 is offline
Registered User
FRC #2877 (Ligerbots)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Newton, MA
Posts: 66
jfitz0807 is an unknown quantity at this point
Re: HELP! CommandGroup not working

Here are some code snippets:

In Robot.h:

class Robot : public IterativeRobot {
private:

public:
CommandGroup *autonomousCommand;
SendableChooser *chooser;
CommandGroup *autoCommand1Can;
CommandGroup *autoCommandMoveToZone;
CommandGroup *autoCommand1Can1Tote;
CommandGroup *autoCommandDoNothing;

Robot.cpp:

autoCommand1Can = new AutonomousCommand1Can();
autoCommandMoveToZone = new AutonomousMoveToZone();
autoCommand1Can1Tote = new AutonomousCommand1Can1Tote();
autoCommandDoNothing = new AutonomousEmpty();

// Stuff to get autonomous selection on SmartDashboard
chooser = new SendableChooser();
chooser->AddDefault("Can to Auto Zone", autoCommandMoveToZone);
chooser->AddObject("Drive to Auto Zone", autoCommand1Can);
chooser->AddObject("Drive to Auto Zone", autoCommand1Can1Tote);
chooser->AddObject("Do absolutely nothing", autoCommandDoNothing);
SmartDashboard:utData("Autonomous Modes",chooser);


Each of the commands is a CommandGroup in which we addSequential a series or other commands, each of which has been tested.

Thanks again for any help.
Reply With Quote