View Single Post
  #2   Spotlight this post!  
Unread 23-01-2015, 12:44
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,715
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Java Command Based Layout - Using a Command Twice

Quote:
Originally Posted by 4373Henry View Post
Looking at examples of command based robots online, I noticed that most people tend to instantiate commands within the subsystem that uses them.

Our code has two drive related subsystems, one for the strafe motor and one for the tank drive motors. Both of these subsystems use the same command- Drive.

I have a feeling that a single command shouldn't be instantiated twice. Is the correct solution to use different commands? Or is it not proper convention to make these separate subsystems?
Can you link me to these ones you are seeing online?

Please take a look at our code from last year. We do as much as we can to make our commands reusable.

If you have any questions please don't hesitate to ask.
Reply With Quote