View Single Post
  #4   Spotlight this post!  
Unread 11-02-2006, 14:19
Oumonkey's Avatar
Oumonkey Oumonkey is offline
Master of the If statement
AKA: Josh Tyus
FRC #1555 (Pulse)
Team Role: Programmer
 
Join Date: Jun 2005
Rookie Year: 2005
Location: Monon, IN
Posts: 50
Oumonkey has a spectacular aura aboutOumonkey has a spectacular aura about
Re: issues limiting a joystick input

I guess this wasn't what ya needed, oh well. You saved me a few hours of anger now. I love you..... j/k but thanks you help me. Now I can finish the rest of my code.

we use something similar in our codes. Except ours is opposite, to get it to max.
if (pwm16>154) pwm16 = 154;
if (pwm16<100) pwm16 = 100;
Try that, I don't know much about programming, but ours also has a little trim so if its within 3 or 4 points of 127 it equals 127;
if ((pwm16<130)&&(pwm16>124)) pwm16 = 127;
I'm pretty sure thats what I have, I don't have my code with me but it should work, if anyone else can point out a mistake go ahead....I almost forgot the semi-colons
__________________

Last edited by Oumonkey : 11-02-2006 at 21:52.