|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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. |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
||||
|
||||
|
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Scoring function in C | mgreene | Programming | 7 | 12-01-2007 02:36 |
| Tips for something big....(Driving cross-country) | Greg Perkins | Chit-Chat | 25 | 25-10-2006 16:02 |
| Loop time for OperatorControl function? Debug blows... | Chris_Elston | Programming | 10 | 13-02-2006 14:42 |
| Limit_Mix() Function | EricWilliams | Programming | 2 | 27-07-2005 23:19 |
| Delaying/Dampening motor response | cadets | Control System | 4 | 05-02-2004 18:27 |