View Single Post
  #4   Spotlight this post!  
Unread 21-04-2004, 14:44
Xufer's Avatar
Xufer Xufer is offline
8 Seasons and as stable as ever
AKA: Working, 2/4 degrees complete still schooling...
FRC #1740 (The Cyber Colonels)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Waterford, CT
Posts: 231
Xufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to beholdXufer is a splendid one to behold
Send a message via AIM to Xufer Send a message via MSN to Xufer Send a message via Yahoo to Xufer
Re: Limit Switches help.

Quote:
Originally Posted by Astronouth7303
A good place for ternaries!

Full code might look like this:
Code:
if (RC_LIMITDOWN) //Alias to digital in
 Joy_1 = ((Joy_1 < 127) ? 127 : Joy_1)
else if (RC_LIMITUP)
 Joy_1 = ((Joy_1 > 127) ? 127 : Joy_1)
2 things when i first wrote this post i cound recall the joystic alias its something like p1_y ( i dotn have the code in front of me, and 2nd off what doese this section do :
Joy_1 = ((Joy_1 > 127) ? 127 : Joy_1)
__________________


If saftey is first and i put FIRST ahead of everything, then i must be the safest guy in the world.

Team 521 Alumni -- Team 1740 Mentor-- Go Go 1740!
Sometimes I think I've been doing this too long and other times I think I haven't done this enough... but all the times I'm sure I'm crazy
Photonics, It's Your Future