Go to Post If that many teams could do it successfully every match this year I will eat my robot. - Jay O'Donnell [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-01-2014, 21:57
bvisness's Avatar
bvisness bvisness is offline
Programming Mentor, Former Driver
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Woodbury, MN
Posts: 183
bvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of light
RobotBuilder toggle option?

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?
Attached Thumbnails
Click image for larger version

Name:	ButtonOptions.png
Views:	23
Size:	3.2 KB
ID:	15837  
  #2   Spotlight this post!  
Unread 15-01-2014, 10:07
DjScribbles DjScribbles is offline
Programming Mentor
AKA: Joe S
FRC #2474 (Team Excel)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2012
Location: Niles MI
Posts: 284
DjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to behold
Re: RobotBuilder toggle option?

I believe you can simply select "When Pressed" and build the toggle into the command.
  #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
  #4   Spotlight this post!  
Unread 15-01-2014, 18:44
bvisness's Avatar
bvisness bvisness is offline
Programming Mentor, Former Driver
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Woodbury, MN
Posts: 183
bvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of lightbvisness is a glorious beacon of light
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!
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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