|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#4
|
|||||
|
|||||
|
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 |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PBASIC 2.5 Code on the RC | Goya | Programming | 2 | 12-01-2003 17:00 |
| Does your team use the Default code. | Jeff McCune | General Forum | 2 | 09-01-2003 14:46 |
| 2003 PBasic default code from Innovation First | ttedrow | Programming | 0 | 06-01-2003 11:18 |
| emulationFIRST (aka PBasic emulator) | Matt Leese | Programming | 5 | 30-06-2002 12:06 |
| BuzzWriter - PBasic Assistant | archiver | 2000 | 0 | 23-06-2002 22:58 |