View Single Post
  #3   Spotlight this post!  
Unread 15-01-2014, 10:28
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: RobotBuilder toggle option?

Quote:
Originally Posted by bvisness View Post
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.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute