Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   RobotBuilder toggle option? (http://www.chiefdelphi.com/forums/showthread.php?t=124661)

bvisness 14-01-2014 21:57

RobotBuilder toggle option?
 
1 Attachment(s)
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?

DjScribbles 15-01-2014 10:07

Re: RobotBuilder toggle option?
 
I believe you can simply select "When Pressed" and build the toggle into the command.

BradAMiller 15-01-2014 10:28

Re: RobotBuilder toggle option?
 
Quote:

Originally Posted by bvisness (Post 1327300)
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.

bvisness 15-01-2014 18:44

Re: RobotBuilder toggle option?
 
If you could work that into RobotBuilder I would be incredibly happy. In the meantime, that's exactly what I've done - moved it outside the comments and modified it. Thanks for your help!


All times are GMT -5. The time now is 03:06.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi