Double USB Controllers not found by game_controller_list()

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Post Reply
Message
Author
Detlef
Posts: 311
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Double USB Controllers not found by game_controller_list()

#1 Post by Detlef »

Hi,

I am writing an instrument for a friend. He wants to assign game controller buttons to AM instrument functions which works fine. But if there is more than one game controller with the same name, only one is found by the game_controller_list() function.

The instrument attached here can be used to list game controllers
Generic - Utility List Gamecontroller.siff
(12.47 KiB) Downloaded 405 times
The output goes to the log file and to the output in the create/edit tab.

Thank you
Detlef

User avatar
Ralph
Posts: 8360
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Double USB Controllers not found by game_controller_list()

#2 Post by Ralph »

Is it a Leo Bodnar card maybe?

Detlef
Posts: 311
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: Double USB Controllers not found by game_controller_list()

#3 Post by Detlef »

Hi Ralph,

no it is two TCA YOKE BOEING yokes. The list, my instrument generates, is as follows. So, one Boeing Yoke is missing.

2024-05-28 12:33:11 INFO SiRunner - Utility List Gamecontroller: kv 1 Saitek PCDash2
2024-05-28 12:33:11 INFO SiRunner - Utility List Gamecontroller: kv 2 Tiller von Schiller
2024-05-28 12:33:11 INFO SiRunner - Utility List Gamecontroller: kv 3 MFG Crosswind V2
2024-05-28 12:33:11 INFO SiRunner - Utility List Gamecontroller: kv 4 FlightSimPM DI-01
2024-05-28 12:33:11 INFO SiRunner - Utility List Gamecontroller: kv 5 FlightSimPM DI-00
2024-05-28 12:33:11 INFO SiRunner - Utility List Gamecontroller: kv 6 FlightSimPM TQ-00
2024-05-28 12:33:11 INFO SiRunner - Utility List Gamecontroller: kv 7 Landing gear
2024-05-28 12:33:12 INFO SiRunner - Utility List Gamecontroller: kv 8 Saitek Pro Flight Rudder Pedals
2024-05-28 12:33:12 INFO SiRunner - Utility List Gamecontroller: kv 9 Controller (GAME FOR WINDOWS)
2024-05-28 12:33:12 INFO SiRunner - Utility List Gamecontroller: kv 0 TCA YOKE BOEING
2024-05-28 12:33:12 INFO SiRunner - Utility List Gamecontroller: 10 controllers found

Thank you
Detlef

Detlef
Posts: 311
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: Double USB Controllers not found by game_controller_list()

#4 Post by Detlef »

Hi @Corjan,

is there a solution to get *all* USB controllers with the game_controller_list() function? If there are more controllers with the same name, only one is found. Maybe it is a problem only with the Thrustmaster TCA yoke. I cannot test that.

Thank you
Detlef

navymustang
Posts: 37
Joined: Sat Nov 28, 2020 11:41 pm
Location: Orlando, FL USA

Re: Double USB Controllers not found by game_controller_list()

#5 Post by navymustang »

I had the exact problem using two or more Leo Bodner cards. The solution for me was to download the Firmware updater and rename them to "Interface 1" and "Interface 2", you don't have a full choice on names. This solved the ID problem.

Detlef
Posts: 311
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: Double USB Controllers not found by game_controller_list()

#6 Post by Detlef »

@navimustang,
sorry, I did not check up on this subject for some time. Thank you for reporting your findings. In my case that is not a solution because I do not have a method to change the game controller names.

I have not checked for a long time. But I think Airmanager can still not differentiate between two USB controllers with the same name.

Detlef

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

Re: Double USB Controllers not found by game_controller_list()

#7 Post by Sling »

Yes it needs to self identify a second instance with the same name as _2 or something else along those lines.

User avatar
Corjan
Posts: 3052
Joined: Thu Nov 19, 2015 9:04 am

Re: Double USB Controllers not found by game_controller_list()

#8 Post by Corjan »

Hi,


Yeah, the API part is simple. Should indeed have some kind of index.
The issue in that there is no easy solution to have a clean coupling between the hardware and the given names.

AM would have to persist what name it gave to what HID device (commonly identified by the physical USB port it is connected to).
HID devices don't have a unique identifier to go by.


I understand this is annoying, but at the same time quite complicated to fix reliably,

Corjan

Post Reply