![]() |
[FTC]: Deadbands (axis/motor power restrictions)
Hello fellow programmers!
I am currently working on finding a solution to a probable bug which in being a programmer for the last 2 years never occurred. The base joystick to motor control has a bug in it. 4wd Code:
motor[motorD]=joystick.joy1_y1; |
Re: [FTC]: Deadbands (axis/motor power restrictions)
Here is the code we've used to create deadbands:
Code:
if((joystick.joy1_y1 < 5) && (joystick.joy1_y1 > -5)) joystick.joy1_y1 = 0; |
Re: [FTC]: Deadbands (axis/motor power restrictions)
I dont have it right here, but ours is something like:
Code:
// since joysticks return -127 to 127 values, and since motors react in a |
Re: [FTC]: Deadbands (axis/motor power restrictions)
Quote:
I'll just see what works best I may end up going with the other idea too but thank you for your help. John Fogarty GForce 3864 |
Re: [FTC]: Deadbands (axis/motor power restrictions)
Another way to do it is
Code:
int threshold = 12; |
| All times are GMT -5. The time now is 18:37. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi