![]() |
Acceleration Curve
We used an acceleration curve to overcome the sensitivity of the low range of the joystick. The code looks exactly like this:
Code:
tempRight = pwm13 = pwm14 = Limit_Mix(2000 + p1_y + p1_x - 127);I'm completely stumped, any help would be greatly appreciated. |
Re: Acceleration Curve
I'm not entirely sure what the error is in your code i will take a look at it again but if u want here is the method i used for doind the same thing u are doing:
try adding brackets for order of operations: tempRight = (((tempRight - 127) * (tempRight - 127))/127) + 127; Quote:
|
Re: Acceleration Curve
You need an asterisk (*) to multiply.
|
Re: Acceleration Curve
Quote:
|
Re: Acceleration Curve
Quote:
'Doh! Man, 3 years programming C and I still make these stupid mistakes. Yesterday I forgot to end a quotation on a string and the compiler decided to give a syntax error on a comment 20 lines down :ahh: Thanks alot for the help guys, it's always nice to have the outside party take a look at your code because one of two things can happen: 1. They write it better. 2. They find your stupid mistake. |
Re: Acceleration Curve
Quote:
|
| All times are GMT -5. The time now is 12:57. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi