View Single Post
  #7   Spotlight this post!  
Unread 26-02-2014, 15:48
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,587
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Impressions: Command Based Robot

Quote:
Originally Posted by notmattlythgoe View Post
We have a DeployArmCommand this year that pretty much covers all of the uses we need. We pass in a boolean if the arm should be deployed or not and a speed at which the rollers should spin. This command can then be used for any situation we need it for.
We find it nice to have simple commands that don't need any outside input (so they can be run from SmartDashboard for debugging. Because of this, we make a complicated command (like your DeployArmCommand) and then make a bunch of commands that extend the complicated command and pass the appropriate data.

We've ended up putting Safety logic in the subsystem, so that everyone is guaranteed to use it, but put Business logic in the command.