FIRST-Team-2557-The-SOTABots / 2015

2015 Robot Drive Code [Deprecated]
GNU General Public License v2.0
1 stars 0 forks source link

Command vs. Subsystem #3

Open Northern-Emperor opened 9 years ago

Northern-Emperor commented 9 years ago

Make sure that you don't make a subsystem that can be done as a command or vice verse. For example don't make a subsystem that calls another subsystem, or a command that only talks to the pwms, pneumatics, etc. A subsystem is for doing actions. A command is for deciding how to do an action. The main robot class is to decide when to do a pre-choreographed action. Thanks for your time reading this. ~NE

defied commented 9 years ago

I would say, don't make it a habit for a subsystem to call a subsystem.

D On Feb 9, 2015 11:20 PM, "Northern-Emperor" notifications@github.com wrote:

Make sure that you don't make a subsystem that can be done as a command or vice verse. For example don't make a subsystem that calls another subsystem, or a command that only talks to the pwms, pneumatics, etc. A subsystem is for doing actions. A command is for deciding how to do an action. The main robot class is to decide when to do a pre-choreographed action. Thanks for your time reading this. ~NE

— Reply to this email directly or view it on GitHub https://github.com/FIRST-Team-2557-The-SOTABots/2015/issues/3.

dbayes commented 9 years ago

You should never call a subsystem from a subsystem. A command can include both subsystems and will handle it correctly.