![]() |
Dampening function for driving.
Our driver this year wants a kind of "transmission" in the programming, where if he has a switch up the speed is halfed(or any other number I suppose) for both motors. Or if it's down it drives normally. I have the function all set for the switch and everything, what's throwing me off is trying to half the motor speed in arcade drive. I have the entire thing done in tank drive, with the switch "transmission" and everything, the problem is in arcade drive... It's driving me crazy trying to think about it and any help would be appreciated. Thanks.
~Brad. |
Re: Dampening function for driving.
In general, a good way to alter an output by a constant factor is:
Code:
pwm01 = (pwm01-127)*0.5+127 |
Re: Dampening function for driving.
Ahh, I got it. I'll get my outputs from the joystick, then half them... I was trying to find a way to do it incorporating it into the joystick function (x - y + 127 or x + y - 127) type thing. But doing it after I get those number is just as good, thanks.
|
| All times are GMT -5. The time now is 01:21. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi