Go to Post Keep arrogant, belittling and misspelled bragging off these boards. - Mike [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Events   CD-Media   CD-Spy   FRC-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 11-20-2007, 06:50 PM
Loki1989's Avatar
Loki1989 Loki1989 is offline
Programming Mentor
AKA: Mike Parker
FRC #1544 (One Byte Short)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Anchorage, Alaska
Posts: 71
Loki1989 will become famous soon enough
Send a message via MSN to Loki1989 Send a message via Yahoo to Loki1989
top hat

the little button for relays on the top of the controller... in between the aux 1 and aux 2 buttons.

what is it called in code please.??
__________________
2005 - 2008 Team Member
2006 - 2008 Team Co-Captain
2008 - Infinite Team Mentor

Team 1544
One Byte Short
  #2   Spotlight this post!  
Unread 11-20-2007, 07:22 PM
fimmel's Avatar
fimmel fimmel is offline
Code Guru
AKA: Forest Immel
FRC #0885 (Green Team 885)
Team Role: Programmer
 
Join Date: Dec 2005
Rookie Year: 2005
Location: Castleton, Vermont
Posts: 322
fimmel has a reputation beyond reputefimmel has a reputation beyond reputefimmel has a reputation beyond reputefimmel has a reputation beyond reputefimmel has a reputation beyond reputefimmel has a reputation beyond reputefimmel has a reputation beyond reputefimmel has a reputation beyond reputefimmel has a reputation beyond reputefimmel has a reputation beyond reputefimmel has a reputation beyond repute
Send a message via ICQ to fimmel Send a message via AIM to fimmel Send a message via MSN to fimmel Send a message via Yahoo to fimmel Send a message via Skype™ to fimmel
Re: top hat

its actually an analog input. im not sure of the exact syntax but its the wheel axis. each direction outputs a number approximately 50? apart. sorry but i dont know the numbers off of the top of my head.

hope that helps
...Forest

EDIT: are you talking about the hat switch on the joystick? or something else because that ^^^ is for the hat switch
__________________

CompTIA A+ Certified
Skills USA Silver medalist - Web Design Competition - Vermont
Best Website - BAE Regional
Follow me on Twitter: @fimmel

Last edited by fimmel : 11-20-2007 at 07:25 PM. Reason: clarification
  #3   Spotlight this post!  
Unread 11-20-2007, 07:43 PM
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: 7,798
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
Send a message via AIM to Alan Anderson
Re: top hat

It connects various resistors from +5 Aux to the same pin as the throttle wheel on a classic CF joystick. The code reads it as p#_wheel (where # is one of 1 through 4).
  #4   Spotlight this post!  
Unread 11-20-2007, 08:24 PM
whitetiger0990's Avatar
whitetiger0990 whitetiger0990 is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Earth
Posts: 157
whitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of light
Re: top hat

Reading it is kind of weird. At least for mine:

pX_wheel (X is 1 to 4, as Alan said)
Code:
Neutral   : 47
Left      : 97
Left Down : 163
Down      : 149
Right Down: 212
Right     : 201
Right Up  : 253
Up        : 253
Left Up   : 253
So unless you reeeaally want the bottom left and right... You can subtract 60, divide by 50, and cut off the decimal. That'll make neutral 0, left 1, down 2, right 3 , and up 4.

Those were for the one sitting next to me, I have no idea of they stay constant between joysticks. But subtracting 60 should be enough to get it all. =)
__________________
print$q=chr(ord($q)+$1)while("7443-0201-8465130105-12-03135-82482113-06-7672-070208-0613-70"=~/(-?\d\d)/g);
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rack'n'Roll Hat 1359th Scalawag General Forum 9 04-15-2007 04:57 PM
"Cool" Hat or Punk Hat? Eugenia Gabrielov Chit-Chat 17 03-02-2005 08:59 PM
Joystick Hat button ten3brousone Programming 8 02-20-2005 12:31 PM
Jostick HAT stick krhs_programmer Programming 2 02-06-2005 05:26 PM


All times are GMT -5. The time now is 07:20 AM.

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


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