Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Joystick Dead band (http://www.chiefdelphi.com/forums/showthread.php?t=2534)

punarhero 14-02-2002 22:25

Joystick Dead band
 
Hi everyone,

Can anyone tell me what code to write to put a dead band on the joysticks to make it less sensitive. Please tell me the code to make joystick 4 less sensitive anyway.

This is urgent

Ian W. 14-02-2002 23:10

i do believe that innovation first has that at their web site. i know that my fellow programmer didn't like their version, so he made up his own, but i'm not exactly sure how it works. i suggest going to http://www.innovationfirst.com/firstrobotics and clicking on the white papers, then go to the joystick filter code. cut and paste the code, and alter the variables to what you need. that's the best help i can give you.

Mike Soukup 15-02-2002 01:24

I'm not sure about the exact pbasic code, but here's the pseudo code:

if ((127 - DeadZone) > Joystick > (127 + DeadZone))
then Joystick = 127

You should perform that logic block before you use the joystick inputs in any calculations.

Mike


All times are GMT -5. The time now is 01:17.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi