Chief Delphi

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

compwiz2008 17-01-2008 21:09

Joystick Output Values?
 
I'm having issues programming our team's drive motors, and I am programming them on asumptions. :confused: I am assuming that the following is true:

joystick left on x-axis = value of 126 to 0
joystick right on x-axis = value of 128 to 255

joystick down on y-axis = 126 to 0
joystick up on y-axis = 128 to 255

Can someone confirm that my assumptions are true, or that their false? Thanks in advance.

CyDrive 17-01-2008 21:17

Re: Joystick Output Values?
 
Yes this is correct though i think you are referring to the y when you say up and down.

Steve_Alaniz 17-01-2008 21:19

Re: Joystick Output Values?
 
Please specify. Do you mean the joysticks that come in the kit or a different joystick? I have a non-kit game port joystick and a saitek joystick that runs through a chiclet. They are the reverse of each other.
The best way to find out is to use the dashboard viewer and look at the values in the OI screen.


good luck

Steve

compwiz2008 17-01-2008 21:19

Re: Joystick Output Values?
 
yeah.. oops. thinking error... I will edit my original post...

CyDrive 17-01-2008 21:29

Re: Joystick Output Values?
 
if you want just do a quick test
Code:

//This is assuming your controller is in port one of the OI
printf("p1_x= %d p1_y= %d \r",p1_x,p1_y);


compwiz2008 17-01-2008 22:40

Re: Joystick Output Values?
 
That is an excellent idea. I'm going to put the values onto the dashboardviewer, which will help with programming and also trimming the joystick.

To the post earlier: our team is using the standard kit joysticks.

Thanks for everyone's help! :)


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

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