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.);