Thread: limit switches
View Single Post
  #14   Spotlight this post!  
Unread 28-04-2005, 02:04
Workaphobia Workaphobia is offline
Registered User
AKA: Jon
FRC #1546 (Chaos Inc.)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Long Island
Posts: 26
Workaphobia will become famous soon enough
Re: limit switches

Er, unless I'm severely mistaken, it's ==0 for when a digital input is grounded, ==1 for when it's not grounded, ==0 for an unpressed joystick button, and ==1 for a pressed joystick button. Unless your switch grounds when inactive and removes the contact when it's activated, you do test for ==0 (or !rc_dig_in01) to tell when the switch is active. Page 14 of the 2004 Programming Reference Guide describes it.

Actually, it appears that the guide makes no exception for the OI inputs, so perhaps it's possible that the joysticks that we typically use *are* of the second kind of switch, that breaks a ground connection instead of establishing one.

The 2005 OI Guide mentions on page 5 that an OI digital input senses a ground connection to "become active".

Ok, so I'm beginning to doubt some of what I've said, but I'm still fairly certain that the RC switch is logically true in code when ungrounded.