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