Log in

View Full Version : Controlling two subsystems with one controller


inkspell4
15-02-2013, 21:51
For out shooter and loading mechanism we are using a single xbox controller. It seems thought that if a single button activates a method that takes time to complete that any other method cannot interrupt when it is activated by a button that is on the same controller.

Is there any way to fix this?

inkspell4
16-02-2013, 19:35
Is each controller only able to have one command running that was activated by a single controller at a time.

gixxy
16-02-2013, 20:22
I was using three commands at once yesterday with an Xbox Controller. (Running Launch Motors with a While Held, Firing a piston using a timeout, and running a second motor with a while held). I know this is possible.

Our Code: https://github.com/frc3946/UltimateAscent

Are you using any Timer.delay()'s in your code? That would cause the entire robot thread to wait.

For further help please post your code.

Ty Tremblay
16-02-2013, 20:47
Controllers are just used to start/trigger commands. If you can't interrupt commands, then your commands must not be implemented correctly. Could you post the code for the command that cannot be interrupted?

inkspell4
16-02-2013, 21:03
To be more specific we are using whenPressed to control a subsystem for each of the bumpers on the controller each one activating a different subsystem.

When one is pressed and the method is running the other will not run. The second method is not linked to the first.

While this is going on the drive train still works although it is controlled by a separate set of joysticks.