Joystick

Previous topic - Next topic

Hemlos

Hi Gernot,
I have been testing this all day, and i have been writting this report all this time as well.
Some issues with joystick parameters, and some bugs here.
I use Saitek x52, a popular yoke flight controller in the 3d world:
Attached below is a joystick test program which reports to the screen all known inputs to GLBasic, it is a dynamic output window, showing all pressed buttons...

------------------------------------------------------------------------------------------------------
1.

GETDIGIX only reports to the program if it is in the left or right position.
Same thing for GETDIGIY.
These both work fine, however, not together at the same time.
This hatswitch is an 8-way position switch.
This is a problem, because, this hat is the main one!
In my windows control panel, the hatswitch is reporting perfectly all 9 positions.
The joystick actually has 3 hatswitches.
The other two hatswitches work with GETJOYBUTTON().
All 3 DO report all 9 positions just perfect in windows control panel.

123
456
789

Today, I updated my drivers, to the latest and greatest, and it still doesnt work in GLBasic.
I rechecked in the Windows Control Panel if it is working, and yes still works there.


Some other notes about GETDIGIY()
GETDIGIY(1) // #1 not 0,   This reports -1 if no controller is plugged in. Also, this reports -1 if only one controller(#0) is plugged in.
This doesnt seem to matter since there is only one digi on my controller, and GETDIGIY(0) is working fine, however, again, it is not working at the same time as GETDIGIX(0)
I attached a test program below, you should be able to see what i mean here.
It shows all known GLBasic controls for joysticks.


------------------------------------------------------------------------------------------------------
2.

GLBasic reports getjoyrx() ry rz for the rotating switches.
However, there is a 4th slider which GLBasic isnt designed to accept, any chance for a feature request?
rw#=GETJOYRW(n%)


[attachment deleted by admin]
Bing ChatGpt is pretty smart :O

MrTAToad

#1
It appears that both return 0 when diagonally pressed - GETDIGIY doesn't appear to be working at all actually - always returns 0

Hemlos

#2
@nik:
DIGIY works fine for me.
What joystick are you using?
Did you check in your game controllers in the control panel trouble shooter to see if it working?
Bing ChatGpt is pretty smart :O

MrTAToad

Ah yes, it does appear to be working :)  I had got a variable in the test program wrong  :(

But diagonals do seem to be a problem though.

Hemlos

I made a test program, it is attached to the first message in this thread.
It reports all known GLBasic joystick inputs.
Bing ChatGpt is pretty smart :O

MrTAToad

I used the example program :)

Kitty Hello

found the bug. Wel.. "feature". I'll change it.

Hemlos

Quote from: Kitty Hello on 2009-Nov-30
found the bug. Wel.. "feature". I'll change it.

Sweet  :good:
Bing ChatGpt is pretty smart :O