Quote:
Originally Posted by bvisness
So I'm using RobotBuilder to generate code for a test robot and I want to toggle a command on and off with a joystick button. There is a method in the command-based code to do this (button->ToggleWhenPressed()) but no option in RobotBuilder. (See attached screenshot.)
Any idea why this is? Is there a way to enable this somehow?
|
We might be able to get that enabled in RobotBuilder, but in the mean time, you can edit the whenPressed() method to be toggleWhenPressed() in the generated code. Just be sure to do it outside of the //BEGIN //END generated code comments.