Go to Post There are two types of team members and mentors: Those who want to be FIRST, and those who want to be first. - Tetraman [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 23-02-2012, 15:25
hsekhon27 hsekhon27 is offline
Registered User
FRC #0280 (TNT)
Team Role: Programmer
 
Join Date: Dec 2011
Rookie Year: 2011
Location: Taylor, MI
Posts: 23
hsekhon27 is an unknown quantity at this point
LEDs on Driverstation

I have read the tutorial for having a gyro display angle on driverstation. I'm guessing it's the same thing for a boolean? But I want to display multiple LEDs on the driverstation. I know I can bundle them and send it as a high priority data to the ds, but my question is, when I unbundle them in the dashboard project, how do I know which one is which boolean?
  #2   Spotlight this post!  
Unread 23-02-2012, 16:12
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: LEDs on Driverstation

When you bundle the data up in the robot code, you can do a "bundle by name" and supply a typedef to define what data goes in which order before you flatten it to a string. Use the exact same typedef as the pattern for the unflatten from string that you use in the Dashboard code.
  #3   Spotlight this post!  
Unread 25-02-2012, 13:16
hsekhon27 hsekhon27 is offline
Registered User
FRC #0280 (TNT)
Team Role: Programmer
 
Join Date: Dec 2011
Rookie Year: 2011
Location: Taylor, MI
Posts: 23
hsekhon27 is an unknown quantity at this point
Exclamation Re: LEDs on Driverstation

Quote:
Originally Posted by Alan Anderson View Post
When you bundle the data up in the robot code, you can do a "bundle by name" and supply a typedef to define what data goes in which order before you flatten it to a string. Use the exact same typedef as the pattern for the unflatten from string that you use in the Dashboard code.
Okay, but for a boolean, don't I have to make an array of elements first? I have three limit switches, and made an array of their values, then I flattened the array using flatten to string function and then sent is as a high priority to dashboard. Now, in dashbard project, do I have to use the index array function after the unflatten from string function? and for data type, can I just put a true or a false constant? Thanks
  #4   Spotlight this post!  
Unread 25-02-2012, 20:37
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: LEDs on Driverstation

If you flatten an array of three booleans, then you have to give an example array of three booleans as a pattern to the unflatten function in order to get the original array of three booleans as the final output.
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 00:51.

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