![]() |
Two Commands Co-Existing depsite Requires()
So, we have a problem with using two commands that both require our IntakeSub subsystem. One is the default command, used for manual control of the intake with a joystick, and the other is a command which should override the default. The manual control works fine, however, when the command is called (by pressing a button), the command starts to run, not interrupting the default command. Both commands use Requires(mIntakeSub) in their constructor - why doesn't the button command interrupt the default?
|
Re: Two Commands Co-Existing depsite Requires()
Are you able to post the code for both commands?
|
Re: Two Commands Co-Existing depsite Requires()
Have you made sure you have code in the IsInterrupted() function of the command? I decided to try out the command based framework two days ago(ported all the SampleRobot code in 10 hours :P) and we had a similar problem, which was fixed by making sure the commands actually ended when we wanted them to.
|
Re: Two Commands Co-Existing depsite Requires()
Quote:
|
Re: Two Commands Co-Existing depsite Requires()
This may sound like "is the computer plugged in", but is this actually running under the command based robot model?
|
Re: Two Commands Co-Existing depsite Requires()
The solution was that we had OI initialized before some other subsystems, which was causing strange behaviour. ALWAYS INIT OI LAST!
|
| All times are GMT -5. The time now is 12:06. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi