Log in

View Full Version : Changing Drive Modes with Button Input


FireAmpersand
30-01-2015, 18:43
We are using Java Command-Based programming and are trying to change the drivestyle with the press of a button. However, we are unable to change our subsystem's default command to change the drivestyle.

Ben Wolsieffer
30-01-2015, 19:05
You should be able to make two Commands, which both require your drive subsystem. Then just bind the whenPressed action of a button to each Command. This will make each Command interrupt the other when they are started.

FireAmpersand
30-01-2015, 19:11
If possible, can you show us some sample code?

FireAmpersand
30-01-2015, 19:21
Nevermind, thank you so much for the suggestion, it worked. Good luck in your last few weeks :)