![]() |
The aforementioned digital filters can accomplish 1 and 3. For 2, why not just constrict p1_x with MIN and MAX (say, MIN 50 MAX 204)?
Obviously this method will only work for one joystick drive, but that seems to be what you are using. |
One caution about wheels
With the code presented above in this thread, you probably won't need the wheel, but, as in all things you assume, there is a catch...
Check out your wheel pot's range (use a debug on the wheel variable). It may be that you won't find 0-254! With p#_y and p#_x, if the trim wheel is not centred, you may not get the full range either. And for what it may be worth, remember that whatever you output to the PWMs, the Victors 883's and 884's respond to values above 230 and below 25 (approximately) with full output (= no pulses). The no-pulse, no-voltage neutral range appeared not to be symmetric about 127 either, on two that were recailbrated to "factory specs" using the Victor manual's instructions ! Hook up a light and a scope to a victor, and send out discrete values, to check this out. |
Default Code
I believe the default code will do exactly what you want it to do.
Instead of pshing full left push to the corners of the joystick y and x-axis. You'll get the results you want drive_FL = (((2000 + p1_y + p1_x - 127) Min 2000 Max 2254) - 2000) drive_FR = (((2000 + p1_y - p1_x + 127) Min 2000 Max 2254) - 2000) :D |
| All times are GMT -5. The time now is 23:33. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi