|
Here are some code bits to try
p1_xfilter VAR byte 'Filtered X input on Port 1
p1_yfilter VAR byte 'Filtered Y input on Port1 p1_xfiltercoef CON 100
p1_yfiltercoef CON 100
p1_yfilter=p1_yfilter+((256+p1_y-p1_yfilter)*p1_yfiltercoef/200)-(256*p1_yfiltercoef/200)
p1_xfilter=p1_xfilter+((256+p1_x-p1_xfilter)*p1_xfiltercoef/200)-(256*p1_xfiltercoef/200)
p1_y = p1_yfilter
p1_x = p1_xfilter
This will slow down the abrubt changes to the p1_x and p1_y values
I can give you code to slow it down a % of full but it sounds like you are getting a spike from either a big change in speed or there is too much load on steering (I can't help you on the second)
P.S. you can play with the coeficients to ramp slower or faster
I think this code came from MOE a few years ago
|