Go to Post FIRST should come with a warning label. - Tim Sharp [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 03-22-2011, 08:33 PM
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
 


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 10:28 AM.

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