Board index FlightGear Support Interfacing

Modding a joystick into a controller

Connecting two computers, using generic protocol, connecting with Matlab?

Modding a joystick into a controller

Postby skelehat » Fri Apr 07, 2017 4:56 pm

Hello,
I had the idea of skipping the part of designing and programming a microcontroller like arduino to make an interface and just modify a joystick into a switchboard to use for avionics, battery, etc. So I opened up an old thrustmaster joystick and resoldered the buttons onto lever switches and gave it new potentiometers then put the whole thing into a case.

It works kind of great but I have some trouble configuring flightgear and map controls onto this "thing". Like in xplane I could select the toggle options from the menu to switch battery and such, that is not the ideal solution either but works. My question is - where should I start configuring it? Do I need to edit the appropriate .xml file? Can I even use lever switches the way they should be done (events on both on and off position) or I should have modified the soldering or the digital logic (flashed ics or something, I'm not even sure what does the joystick entirrely consist of) as well for this to work? I didn't change anything in the joystick connections just resoldered the buttons into lever switches.
User avatar
skelehat
 
Posts: 11
Joined: Tue Sep 06, 2016 11:29 am
Version: 2016.2.1
OS: Devuan GNU/Linux

Re: Modding a joystick into a controller

Postby Isaak » Fri Apr 07, 2017 8:30 pm

You 'll have to edit the xml, but it' s pretty straightforward, I 'm no programmer and have done a lot of modifications myself. To change a toggle button into a switch, I' d use the mod-up bindings (see Howto: joystick in the wiki). Good luck and feel free to share your results with the community!
Want to support medical research with your pc? Start Folding at Home and join team FlightGear!
Isaak
 
Posts: 768
Joined: Sat Jun 04, 2011 3:52 pm
Location: Hamme, Belgium
Pronouns: he, him
Callsign: OO-ISA
Version: next
OS: Windows 10

Re: Modding a joystick into a controller

Postby skelehat » Sun Apr 09, 2017 12:44 am

Thank you a lot, I tried a few things today and the options I actually found work like a charm. I successfully modded an axis to handle mixture and I could show test messages with the switches using gui.popupTip(). Where could I find a full list though ? Are these simply NASAL functions so I should try to find a list of those? I want to have battery/avionics/parking brake switches and maybe a flaps and instrument lighting axis.

controls/lighting/instruments-norm and /controls/gear/brake-parking don't seem to do much, I tried them both between script and property tags.

EDIT: I went on to the irc channel and got enough helpful tips that now everything is working as intended. The property-toggle and the browse internal properties option in the debug menu was really all I needed.
Last edited by Johan G on Sun Apr 16, 2017 1:30 am, edited 1 time in total.
Reason: No need to quote the entire preceding post
User avatar
skelehat
 
Posts: 11
Joined: Tue Sep 06, 2016 11:29 am
Version: 2016.2.1
OS: Devuan GNU/Linux


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 3 guests