View Single Post
  #2   Spotlight this post!  
Unread 01-02-2008, 19:14
JohnC's Avatar
JohnC JohnC is offline
my other name is nigel
FRC #0360 (360 Revolution)
Team Role: Programmer
 
Join Date: Mar 2005
Rookie Year: 2005
Location: user_routines.c
Posts: 100
JohnC is a jewel in the roughJohnC is a jewel in the roughJohnC is a jewel in the roughJohnC is a jewel in the rough
Send a message via AIM to JohnC
Re: Need Help with Sensitivity of Joysticks

We used this to scale our drive last year. The "Offset" is referring to how far the joystick's Y-axis potentiometer is from 127.

Code:
int Scale_Offset(int initialValue, double scaleFactor) {
	return ((double)(initialValue-127)/scaleFactor)+127;
}
In context, it looked like this:

pwm05 = Scale_Offset(p1_y,3.);
__________________
What place are we at? ... TODAI!