![]() |
Parallel commands that depend on the same subsystem?
How would the two commands be ran in this situation? Either by running them in parallel in a command group, or if both commands were default commands of different subsystems.
I know that if one command is run that depends on a subsystem that another running command depends on, either of the commands are terminated depending on the circumstances. Is there a way to get two commands to literally run in parallel, accessing the same subsystem? So if commands A and B depend on subsystem C, the scheduler will execute A, then B, A, B, and so on. Is there a way to get that working? EDIT: If there is not, I'll explain my design further. In this case command A would only read information from subsystem C. It would only use accessor methods and no mutator methods. So would it be safe to just omit the "requires" call? |
Re: Parallel commands that depend on the same subsystem?
Quote:
|
Re: Parallel commands that depend on the same subsystem?
Quote:
|
Re: Parallel commands that depend on the same subsystem?
If A and B both "require" C in your case, either you are trying to control the same physical parts of the robot (motor controllers, solenoids, etc) with 2 commands (bad and can have unexpected results), or your subsystem has 2 different (sets of) physical parts that the commands are controlling (in which case you should refactor said subsystem into 2 subsystems).
|
| All times are GMT -5. The time now is 11:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi