|
Re: Desensitizing Joysticks
This is what I came up with during our team's meeting today after school:
/*
pwm is a jostick value, 0-254
pwm_in is the pwm_out of the default code
pwm_out is the new value going to the joysticks
null_zone_swing_fraction is the amount you'd want the joystick to move without the motors kicking in.
*/
pwm_out = (pwm_in / (1-null_zone_swing_fraction)) - null_zone_swing_fraction(1 - null_zone_swing_fraction)
So. Its quite simply a y = mx + b "transfer" function. enjoy.
__________________
<<<theoldmanskiba>>>
2003 Canadian Regional Delphi Driving Tomorrow's Technology Award winners
|