FYI, the general formula for scaling one range of values to another is:
Code:
newValue = newMax + (newMax - newMin) * (oldValue- oldMax) / (oldMax - oldMin)
In this case, oldMin and oldMax are -1 and 1, respectively (the joystick range), while newMin and newMax are 0 and 1, respectively (the servo range).