Quote:
|
Originally Posted by bglass
Thanks a lot for the tip Alan, it solved my problem. Now I just have to figure out how to make my x-axis a little less sensitive. Thanks for your help!
|
Try this:
Code:
p1_y = (p1_y / 3) + ((127 / 3) * 2); //scale down Y axis
p1_x = (p1_x / 3) + ((127 / 3) * 2); //scale down X axis
left_pwm = Limit_Mix(2000 + p1_y - p1_x + 127); //limit pwm
right_pwm = Limit_Mix(2000 + p1_y + p1_x - 127); //limit pwm
pwm11 = left_pwm;
pwm12 = right_pwm;
If you want just a little more GO GO juice...do this:
Code:
p1_y = (p1_y / 2) + ((127 / 2) * 1); //scale down Y axis
p1_x = (p1_x / 2) + ((127 / 2) * 1); //scale down X axis
left_pwm = Limit_Mix(2000 + p1_y - p1_x + 127); //limit pwm
right_pwm = Limit_Mix(2000 + p1_y + p1_x - 127); //limit pwm
pwm11 = left_pwm;
pwm12 = right_pwm;
Hope it helps.