"Game Controller" does not call back on all axis

Questions about deployment and use of Air Manager Instruments

Moderators: russ, Ralph

Message
Author
User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: "Game Controller" does not call back on all axis

#31 Post by jph »

Tetrachromat wrote: Tue Jul 13, 2021 9:57 am Hey Joe

Friday is remote debugging day... :D
Ooooooooo. Sounds like fun :lol:
Once you get that connection it will remain with you forever.... ;) .
Joe. :D
Joe. CISSP, MSc.

Tetrachromat
Posts: 236
Joined: Sun Feb 14, 2021 6:55 pm

Re: "Game Controller" does not call back on all axis

#32 Post by Tetrachromat »

That pointys tool is really great at identifying all the inputs:

Here is the screen for the X52 Pro:
saitek x52 pro flight control system.png
It is able to see all 39 (!) buttons, 6 axis, 1 slider and 1 hat switch

And here is the screen for the flight yoke system:
flight yoke system.png
the flight throttle quadrant:
flight throttle quadrant.png
and finally the rudder pedals:
flight rudder pedals.png
One can see clearly that the rudder axis (Zrot) is offset from the main axis X and Y (e.g. no contigous indexes, some axis in between are left out).

I assume that each platform (Win, Linux, Mac) uses different methods/API to access the game controllers and will report the inputs differently.

On the Windows platform the DirectX API seems to be most complete.

Paul

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: "Game Controller" does not call back on all axis

#33 Post by jph »

Nice one Paul. ;)
Glad you found it useful. I never get rid of older programs that were useful. :D . Luckily I have a nice QNAP NAS at home with a TR-004 expansion with about 30TB of usable space (and full backups externally) so nothing gets deleted.. some stuff I have is 20 years old or more ... (photos etc can be more than 60 years old - yikes !) :o
That is the thing with game controllers / joysticks / flight controllers etc in that despite early attempts at a supposed standardisation of the USB descriptor / class, it was and is inevitable that companies do there own thing. It is a case of 'suck it and see'
I am sure Corjan can work his magic at the win API level but I like to keep it simple where possible. There are some amazing possibilities with AM acting as a 'man in the middle' vector, but as to how useful this actually is with the power of things like X-Plane etc ? I don't know. I would love to see the AM stuff working fully though as performing actions based on controller inputs is really neat.
It is just a case of getting axis data and - imho - completely ignoring any 'conventions' and using an axis value - even if it is 1 to 'x'
Joe
Joe. CISSP, MSc.

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: "Game Controller" does not call back on all axis

#34 Post by Sling »

Sling wrote: Sun Jul 11, 2021 12:58 pm It may just be something like it’s using an axis that mine is not or perhaps it’s not using sequential axis and that is where the bug lies.
It was just an idea but it seems the non sequential axis is a clear difference. I wonder if that is an indication of the problem or just a red herring. At least Corjan can check. :D

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: "Game Controller" does not call back on all axis

#35 Post by jph »

HI Paul / Tony.
As far as identification of actual axis in use and conventions, (and may end up being nothing of an issue to Corjan when he does his magic)

All I am showing here is simply some of the ways that the identification of USB HID inputs can be so effing confusing - purely for information only for those interested-

I think one of the big issues for USB in general is that the USB Specifications (USB.org) for the GENERIC DESKTOP PAGE (0x01) - and the SIMULATION CONTROLS PAGE (0x02) are misused across all platforms.
Whilst the SIMULATIONS CONTROLS PAGE looks, at first sight, to be the one to use, it simply isn't by a hell of a lot of manufacturers. And, to be honest, the GENERIC DESKTOP PAGE (0x01) offer all you would ever need so many say to hell with 0X02 and just use that, as I think is definitely the way to do it.
Using a 0X02 page with named axis - rudder, throttle etc - will tend to use one of the standard list of the axis - basically, it simply assigns an alternative 'name' to the DV axis' to be used in the program / CPL.
This is only for - what was originally planned - as plug and prey.
It would be very interesting - as an informative exercise - to show the pointy's panel compared to the win CPL for each control.
(note) - even Pointy's gave up on the last two of the 8 axis and simply called then S0 and S1 as the Slider, Dial and wheel all occupy only the two spaces as one can overwrite the other as far as naming is used.
At least the actual DV Axis' remains constant.
To show how antiquated the original (and current!) USB 0X02 page can be, you can even have controls for flying a 'MAGIC CARPET' ... I think the days of 'Prince of Persia' and the inability of the game to offer any setup, hence needed plug and prey - are long gone, and was probably never used anyway.... :?
Even then they are simply axis and buttons that can be assigned using standard naming conventions for the standard axis and occupy the same space - with just another 'name' for the game to supposedly recognise. It beggars belief really. What were they thinking of ?. You can even have individual golf club selection as a named device... :lol:
This of course, - the USB.org, was 99% influenced by microsoft - who, as usual misread the market, and future developments, and thought every game would be of a certain genre and would also diligently follow the proposed naming convention - never thinking that it would be far easier to just connect a control, look at the axis available and get the user to assign them as needed.
Who could believe the lack of foresight by Microsoft and the arrogance that everybody WILL follow their own convention.. Hmmm.
Joe. CISSP, MSc.

Post Reply