Go to Post I'd hate to state the obvious here...but I believe that we all just got Rick-rolled... - Hallry [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-01-2015, 15:41
tr6scott's Avatar
tr6scott tr6scott is offline
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Xbox controller has 10 buttons, Button Array has 9 elements?

Posted question here, but after, figured it was best to start a new thread to be seen.

So we are trying to code a feature with "button 9" of the xbox controller, but the button array in labview only has 9 elements.

Both the team 358 diagram and the array index start with 0.

So the Joystick has 10 buttons, from 0 to 9, yet the array only has 9 elements from 0 to 8.

Tell me where I messed up.

http://www.chiefdelphi.com/forums/sh...6&postcount=12
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #2   Spotlight this post!  
Unread 21-01-2015, 19:40
Bpk9p4's Avatar
Bpk9p4 Bpk9p4 is offline
Registered User
FRC #1756
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Illinios
Posts: 274
Bpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant futureBpk9p4 has a brilliant future
Re: Xbox controller has 10 buttons, Button Array has 9 elements?

i had the same problem. what you need to do is right click and add a new variable to the array. i do no have labview in front of me now but if you have more trouble let me know and i will get a screen shot for you
Reply With Quote
  #3   Spotlight this post!  
Unread 21-01-2015, 19:40
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,820
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Xbox controller has 10 buttons, Button Array has 9 elements?

I'm afraid I don't follow what problem you are encountering.
Perhaps a screen shot or snippet?

I split out the buttons from a joystick and can see all 10 (0-9).
You can also use Index Array to specifically ask for button 9.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #4   Spotlight this post!  
Unread 21-01-2015, 19:48
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,820
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Xbox controller has 10 buttons, Button Array has 9 elements?

Oh, you're using old code from last year?
The button cluster was removed from the palette this year, so I didn't even think of it.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 21-01-2015 at 23:14.
Reply With Quote
  #5   Spotlight this post!  
Unread 21-01-2015, 20:03
tr6scott's Avatar
tr6scott tr6scott is offline
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: Xbox controller has 10 buttons, Button Array has 9 elements?

Mark,

The "default" button array only has 9 elements, so we can't pull the 10th button, "Buttons[9]"

I added the array to cluster and the unbundle by name, to show issue.

I will try to add another value, but I would think that would be in the "Get Values" vi.
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	78
Size:	73.6 KB
ID:	17930  
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #6   Spotlight this post!  
Unread 21-01-2015, 22:54
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,820
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Xbox controller has 10 buttons, Button Array has 9 elements?

I understand now.

To get the 10th button right-click on Array to Cluster and choose Cluster Size...
Change 9 to 10.
You should see Button 9 in the button cluster.

Array to Cluster defaults to 9 items.
Attached Thumbnails
Click image for larger version

Name:	ArrayToCluster.jpg
Views:	44
Size:	29.4 KB
ID:	17935  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 21-01-2015 at 23:14.
Reply With Quote
  #7   Spotlight this post!  
Unread 22-01-2015, 06:04
tr6scott's Avatar
tr6scott tr6scott is offline
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: Xbox controller has 10 buttons, Button Array has 9 elements?

Interesting, but we were having an issue with the code above with the index array, and pulling the boolean data from the 9th element. . .

If the problem is in the array to cluster, then the index should have worked...

humm..
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #8   Spotlight this post!  
Unread 22-01-2015, 07:16
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Xbox controller has 10 buttons, Button Array has 9 elements?

I agree with Mark. I tested the buttons with the TI board for 32 buttons, and the underlying code is good for 128 or more. The silly conversion to cluster doesn't know how many elements you need, and has to decide at compile time. It has that popup that almost nothing else has, and trips up people all the time -- one of these days ...

Greg McKaskle
Reply With Quote
  #9   Spotlight this post!  
Unread 22-01-2015, 07:38
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,820
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Xbox controller has 10 buttons, Button Array has 9 elements?

Quote:
Originally Posted by tr6scott View Post
Interesting, but we were having an issue with the code above with the index array, and pulling the boolean data from the 9th element. . .

If the problem is in the array to cluster, then the index should have worked...

humm..
I've never had any problem with index array, so something odd is going on.

Quote:
Originally Posted by Greg McKaskle View Post
...the underlying code is good for 128 or more.
Now I want a game controller with 128 buttons, just like my tv remote...
Attached Thumbnails
Click image for larger version

Name:	IndexArray.png
Views:	175
Size:	22.1 KB
ID:	17937  
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 22-01-2015 at 07:51.
Reply With Quote
  #10   Spotlight this post!  
Unread 22-01-2015, 12:07
cgmv123's Avatar
cgmv123 cgmv123 is offline
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,080
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: Xbox controller has 10 buttons, Button Array has 9 elements?

Quote:
Originally Posted by Mark McLeod View Post
Now I want a game controller with 128 buttons, just like my tv remote...
You mean like this one? (Although HID apparently only supports 32 buttons.)
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

Reply With Quote
  #11   Spotlight this post!  
Unread 22-01-2015, 13:15
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Xbox controller has 10 buttons, Button Array has 9 elements?

DIJOYSTATE2 has four POVs, 128 buttons, and eight axes and quite a few calculated values. Since DInput has this, I was assuming that it matched HID. I poked around and found different opinions. I hope I never have a device that pushes that boundary.

Greg McKaskle
Reply With Quote
  #12   Spotlight this post!  
Unread 23-01-2015, 06:18
tr6scott's Avatar
tr6scott tr6scott is offline
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: Xbox controller has 10 buttons, Button Array has 9 elements?

After retesting code last night we are also NOT having an issue with the index array either!

(We are having an issue understanding troubleshooting labview)
(and that cluster got me too)

and you two can stop talking about these controllers, they are generating hardware requests. . .
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
Reply


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 02:16.

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