View Single Post
  #3   Spotlight this post!  
Unread 22-03-2011, 20:33
Arthur3103 Arthur3103 is offline
Mentor Team 3103
AKA: Arthur Purpich
FRC #3103 (Iron Plaid)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Houston, TX
Posts: 6
Arthur3103 is an unknown quantity at this point
Re: Limit switches in autonomous

We normally test

if (topLimit.Get())
{
do something
}

or

if (!topLimit.get())
{
do something else
}

The code that works is testing == true while the code that does not work is testing == false.

I can't see anything wrong with the code; I just have the observation that your test is different between the code that is working and the code that is not working. You might want to rewrite the auto code to use a == true test.
Reply With Quote