Board index FlightGear Support Installation Mac

joystick on Mac  Topic is solved

Installing FlightGear, scenery, aircraft etc. on Mac.

joystick on Mac

Postby AlanK » Wed Jul 03, 2019 8:33 pm

Hi, Returning to FlightGear after some years I am having trouble trying to configure the joystick.

I have installed FlightGear V2018.3.2 on an imac (late 2013) with 32GByte 1600MHz DDR3 Ram and an NVIDIA GeForce GTX775M vide card with 2 GByte of cache. I want to use a SpeedLink Black Widow joystick. When I go to the in-app joystick configuration, the only joystick listed in the drop down menu is "USB Game Controllers", and the configuration file is given as "/Applications/FlightGear.app/Contents/Resources/data/Input/Joysticks/Default/joystick.xml."

All the appropriate joystick xml files are present and seem to be in the right place (/Applications/FlightGear.app/Contents/Resources/data/Input/Joysticks) but are not found by the configuration panel. Further, manually editing the /Applications/FlightGear.app/Contents/Resources/data/Input/Joysticks.xml file to specifically point at the relevant joystick has no effect (changes nothing).

Am I missing something obvious?

Thanks,

Alan
AlanK
 
Posts: 6
Joined: Wed Jul 03, 2019 8:14 pm

Re: joystick on Mac

Postby wkitty42 » Thu Jul 04, 2019 2:25 am

unplug the USB Game Controllers?
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: joystick on Mac

Postby AlanK » Thu Jul 04, 2019 3:05 pm

Thanks for the suggestion. There is no "USB Game Controller" attached other than the joystick I want to configure. I have tried unplugging various other things from USB ports and tried connecting the joystick to different USB ports - makes no difference. Interestingly(?) if I start flightgear without the joystick attached and then look at the "Joystick Configuration" panel, nothing appears in the Joystick dropdown menu and no Configuration File is specified, so it looks as though the software recognises that something is connected, but does not identify it correctly and will not allow me to identify it manually.

I thought maybe the software was looking in the wrong place for the joystick files so I tried going to Tools/Select data files location, but that does nothing. Neither does Tools/View command-line. Possibly unrelated, but maybe not? The flight simulator itself seems to work - I can get an aircraft into the air using the keyboard commands, but that is a bit limiting :(
AlanK
 
Posts: 6
Joined: Wed Jul 03, 2019 8:14 pm

Re: joystick on Mac

Postby wkitty42 » Thu Jul 04, 2019 4:33 pm

i didn't know if you might have had other controllers plugged in as well... we've seen that where someone was reporting errant control signals and we found out they had a RC model controller connected... once it was disconnected, everything went well for them...

i don't know which joystick file would match your joystick and i don't have a Mac... but it is possible that your joystick is returning an ID string that FG doesn't know about... can you provide more details about the stick? like the model number? is it a "Flight Stick"? i find a file that might fit but it may need to have the proper ID string added to it for your stick...

can you maybe get to a command prompt and see if "lsusb" works on your system? if it does, do you see a string for your joystick in the output? for example, mine shows this...
Code: Select all
$ lsusb
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 003: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Bus 005 Device 002: ID 044f:b10a ThrustMaster, Inc. T.16000M Joystick
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 008 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

which tells me there's a thrustmaster joystick attached... once we know what ID String your joystick is using, we may be able to add it to the proper file and get it recognized... if that works, then we can get it added to the project so others won't have this same problem if they have the same stick... currently there are four IDs for this stick in the file i'm suspecting is where the fix needs to be made...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: joystick on Mac

Postby AlanK » Thu Jul 04, 2019 8:04 pm

Thanks. The joystick is a Speedlink Black Widow (SL-6640). I have had it working on a (different) Mac previously, but under an earlier version operating system. There is a corresponding xml file in the data/Input/Joysticks/SpeedLink directory, but obviously the device is not being recognised.

There is no native lsusb command in MacOS. The closest you can get is to use the system profiler command : system_profiler SPUSBDataType
That is not exactly equivalent, but the output shows (amongst others):

USB Game Controllers:

Product ID: 0x0317
Vendor ID: 0x07b5 (Mega World International Ltd.)
Version: 1.01
Speed: Up to 1.5 Mb/sec
Manufacturer: Mega World
Location ID: 0x14420000 / 14
Current Available (mA): 500
Current Required (mA): 350
Extra Operating Current (mA): 0

That is the entry for the joystick and explains where the "USB Game Controllers" came from.

If you go to the touble of installing a lsusb clone on the mac you get:

$ lsusb
Bus 020 Device 014: ID 07b5:0317 Mega World International, Ltd
Bus 020 Device 012: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 020 Device 007: ID 05ac:828d Apple, Inc.
Bus 020 Device 006: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 020 Device 005: ID 152d:1561 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 020 Device 004: ID 1058:0820 Western Digital Technologies, Inc.
Bus 020 Device 003: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 020 Device 002: ID 05ac:8511 Apple, Inc.

which confirms the location. So I guess the question now is how to associate the vendor & product id's with the relevant xml file?
AlanK
 
Posts: 6
Joined: Wed Jul 03, 2019 8:14 pm

Re: joystick on Mac

Postby AlanK » Thu Jul 04, 2019 8:24 pm

So just going one step further and putting an entry for "USB Game Controllers" in the relevant xml file makes it work. Maybe not the most elegant solution but it gets it working. I am happy to provide any further info if it helps avoid the problem for others. Thanks for the helpful suggestions.
AlanK
 
Posts: 6
Joined: Wed Jul 03, 2019 8:14 pm

Re: joystick on Mac

Postby wkitty42 » Thu Jul 04, 2019 9:16 pm

which file did you add that to? i would put "Mega World International, Ltd" in there instead of "USB Game Controllers" since that seems to be what the stick returns as its ID... if it still works with this change, please let us know so we can get word to the developers' list with the change...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: joystick on Mac  

Postby AlanK » Thu Jul 04, 2019 9:48 pm

I added the line:
<name type="string">USB Game Controllers</name>
to the file data/Input/Joysticks/SpeedLink/black-widow.xml

Then it works. If I replace "USB Game Controllers" with "Mega World International, Ltd" it no longer works. So I guess that it is picking up "USB Game Controllers" as the ID, at least on a Mac.
AlanK
 
Posts: 6
Joined: Wed Jul 03, 2019 8:14 pm

Re: joystick on Mac

Postby wkitty42 » Fri Jul 05, 2019 2:27 pm

ok... that's weird to me based on my meager understanding of what i see done in other similar situations... james (aka zakalawe) would know better, though, since he's one of the main FG developers and he develops on Mac... he's away for a few weeks but i'll tag him anyway and see if he has anything else to input...

in any case, i'm glad you got it working! now we'll see if we can extend that to other Mac users with the same stick :)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: joystick on Mac

Postby VicMar » Fri Jul 05, 2019 2:45 pm

Hi AlanK,

I'm pleased you managed to find a workaround. I was going to suggest copying the appropriate file which worked in that previous version of FG and putting that in . However, you were much too quick for my addled old brain.

Remember what you've done for when the next version is released, and don't forget to mark this thread as solved.

Cheers,

Vic
Time flies like an arrow
Fruit flies like a banana
User avatar
VicMar
 
Posts: 2044
Joined: Sun Apr 06, 2008 6:53 pm
Location: Lancing. UK (EGKA)
Callsign: VicMar
Version: 2018.3.1
OS: OS X 10.12.6

Re: joystick on Mac

Postby AlanK » Fri Jul 05, 2019 4:26 pm

Hi Vic,

Thanks. Please excuse what is obviously a newbie question, but how do I mark the thread as solved (do I just click on the green tick to "accept this answer"?)

Cheers,

Alan
AlanK
 
Posts: 6
Joined: Wed Jul 03, 2019 8:14 pm

Re: joystick on Mac

Postby wkitty42 » Fri Jul 05, 2019 5:14 pm

yuppers! :)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: joystick on Mac

Postby VicMar » Sat Jul 06, 2019 7:43 am

Hi Alan,

I think yuppers means yes. But if not, the answer is Yes.

Cheers,

Vic
Time flies like an arrow
Fruit flies like a banana
User avatar
VicMar
 
Posts: 2044
Joined: Sun Apr 06, 2008 6:53 pm
Location: Lancing. UK (EGKA)
Callsign: VicMar
Version: 2018.3.1
OS: OS X 10.12.6

Re: joystick on Mac

Postby wkitty42 » Sat Jul 06, 2019 4:16 pm

it does :)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04


Return to Mac

Who is online

Users browsing this forum: No registered users and 2 guests