View Single Post
  #4   Spotlight this post!  
Unread 06-02-2002, 22:49
Matt Reiland's Avatar
Matt Reiland Matt Reiland is offline
'The' drive behind the drive
None #0226 (TEC CReW Hammerheads)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1999
Location: Troy Michigan
Posts: 712
Matt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond reputeMatt Reiland has a reputation beyond repute
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