grimmsterj
07-02-2016, 16:44
Hi everybody,
So this year we are extremely inexperienced in the programming department, as our lead programmer has graduated and our only other programmer really wasn't at the level he needed to be. I have done a lot of learning over the past few weeks but currently I've ran into an error with my code that I can't seem to figure out.
I can provide code if anyone needs it, but basically I have a pneumatic subsystem along with a raise command and a lower(retract) command. (We did have one command that did both but switched to one for each in an attempt to get rid of some of the errors we faced). Very simple code all intended to open and close a piston.
When I deploy code and enable the bot, the compressor starts up and it acts like it's working and then I get a no code error and everything shuts down.
The main error I can't seem to get past is:
"nhandled exception: edu.wpi.first.wpilibj.command.IllegalUseOfCommandE xception: Can not add new requirement to command after being started or being added to a command group"
While we have other commands, most of them are doing nothing so I am almost certain it is something with the raise/lower commands. We don't have a command group so I'm assuming it has something to do with us trying to add a new requirement after a command is started. However, any "requires()" that I have in the commands is under init.
No idea why this error is coming up or how to solve/troubleshoot it. Any help would be greatly appreciated.
So this year we are extremely inexperienced in the programming department, as our lead programmer has graduated and our only other programmer really wasn't at the level he needed to be. I have done a lot of learning over the past few weeks but currently I've ran into an error with my code that I can't seem to figure out.
I can provide code if anyone needs it, but basically I have a pneumatic subsystem along with a raise command and a lower(retract) command. (We did have one command that did both but switched to one for each in an attempt to get rid of some of the errors we faced). Very simple code all intended to open and close a piston.
When I deploy code and enable the bot, the compressor starts up and it acts like it's working and then I get a no code error and everything shuts down.
The main error I can't seem to get past is:
"nhandled exception: edu.wpi.first.wpilibj.command.IllegalUseOfCommandE xception: Can not add new requirement to command after being started or being added to a command group"
While we have other commands, most of them are doing nothing so I am almost certain it is something with the raise/lower commands. We don't have a command group so I'm assuming it has something to do with us trying to add a new requirement after a command is started. However, any "requires()" that I have in the commands is under init.
No idea why this error is coming up or how to solve/troubleshoot it. Any help would be greatly appreciated.