Board index FlightGear Development

Customised joystick configs

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Do you have a customised joystick configuration?

No, I the regular configurations in FGDATA work fine for me
5
12%
Yes, I edited an existing config by hand
32
74%
I used the (new) configuration dialog to create a custom config for my joystick
6
14%
 
Total votes : 43

Re: Customised joystick configs

Postby Johan G » Mon Apr 21, 2014 5:39 pm

I have edited the files for my joystick and throttle to somewhat work like the two aircraft I am flying most in FlightGear.

One of the changes is to actually use the trim hat for trim instead of looking around, ;) though it took me several years to find out that I had inverted the elevator trim. :oops: :lol:
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5292
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: Customised joystick configs

Postby sanhozay » Mon Apr 21, 2014 6:49 pm

I vote for option four: I used the configuration dialog to create a custom config then edited the config file by hand.

Sorry to be awkward.
sanhozay
 
Posts: 1207
Joined: Thu Dec 26, 2013 11:57 am
Location: EGNM
Callsign: G-SHOZ
Version: Git
OS: Ubuntu 16.04

Re: Customised joystick configs

Postby hvengel » Mon Apr 21, 2014 7:15 pm

When I started using the Warthog joystick the standard XML in the <fgdata>/Input/Joysticks directory had the elevator trim backwards. Kind of strange since the trim hat on the stick is clearly marked with the correct trim direction. The view hat had the same issue and I ended up reversing both when I modified the XML.

The Warthog XML also supports aircraft specific overlay files. I have not tested this yet but I will in the next few days. Apparently these are almost exactly like the normal XML other than not having a name in the XML and these only need to define differences from the default XML. How common is it for this feature to be supported?

I think the configuration dialog is OK for doing basic stuff but what can be done is limited. For my old joystick I used the configuration dialog up to the point where I did everything I could do with it and then added additional functionality by hand editing the XML.

One of the really glaring omissions from the configuration dialog is the ability to assign a button to the engine starter. This seems like basic functionality and the only way to set this up is to hand edit the XML.

There are also a lot of functions that only work with buttons that are logically things that should work with an axis. For example the trim stuff only works with buttons and if you want to have something like the elevator trim connected to a physical axis on the controller you have to configure this by hand.

So there are a number of basic things that can't be done using the configuration dialog and this limits what novice users can do with their joystick setup.
hvengel
Retired
 
Posts: 1128
Joined: Sun Dec 24, 2006 4:35 am
Location: Minden Nevada

Re: Customised joystick configs

Postby Philosopher » Mon Apr 21, 2014 7:24 pm

Only the Warthog does that (I think that's Franz's work). Mine does it completely differently - I basically support customizing specific functions (throttle modes, modifiers with brake combinations, etc.), but including arbitrary Nasal for execution, so that theoretically could overwrite anything :D.

Again, some of us were going to work on the dialog and add such features, but it's already been a while. I'd be interested in picking it up again, though. ('Specially when Tom unveils his layout engine - he says he's close :)) Also, we would probably have different levels, because as was said back there,
stuart wrote in Mon Jul 08, 2013 9:29 pm:It's critical that it remains easy to use for new users. In particular, I spent some time determining the minimum set of bindings that were really required so that someone programming their joystick for the first time wouldn't be overloaded by a massive list of possible key bindings. It might be worth having an "Advanced bindings" option that enables modifier keys and the more esoteric bindings.


Link to the topic, where we should continue discussion :): viewtopic.php?f=24&t=20324
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: Customised joystick configs

Postby Kabuki » Mon Apr 21, 2014 9:47 pm

sanhozay wrote in Mon Apr 21, 2014 6:49 pm:I vote for option four: I used the configuration dialog to create a custom config then edited the config file by hand.

Sorry to be awkward.


That's what I do, too. The dialog supplies the correct name for the joystick and makes a handy-dandy skeleton. It's also nice that custom hand coding isn't clobbered when you use the dialog again.

ONE issue with the dialog's code, however is that the <dead-band> element is in the wrong place. According to what I've read, the <dead-band> element must NOT be inside the <binding> block.

I'm also finding that working with the dead-band, power, and tolerance variables can be a pain, and should probably be set on a per-aircraft basis.
This is a family-friendly saloon. No talk stink.
Kabuki
 
Posts: 587
Joined: Fri Oct 23, 2009 11:21 pm
Location: Usually on the ground, always in the sky, except when underwater.
Callsign: Kabuki
Version: 3.0.0
OS: Windows 7

Re: Customised joystick configs

Postby Kabuki » Mon Apr 21, 2014 9:55 pm

I use the hat in conjunction with the shift key to zoom in and out, and in conjunction with the control key to trim. Otherwise, it moves the view.

Also, I found out that there's an "autotrim" function available...

Code: Select all
<button n="1">
   <desc type="string">Custom</desc>
   <binding>
      <command type="string">nasal</command>
      <script type="string">
            cancelTrim = 0;
            trimFlag = 0;
            settimer(func{
               trimFlag = 1;
               if(!cancelTrim){
                  gui.popupTip("Move stick to neutral and release to trim");            
                  aircraft.autotrim.start();
               }
            },0.5);


      </script>

   </binding>
   <mod-up>
      <binding>
         <command type="string">nasal</command>
         <script>
               if(trimFlag){
                  gui.popupTip("Trim released");   
                  aircraft.autotrim.stop();      
               }else{
                  cancelTrim = 1;
                  topMode = topMode + 1;
                  gui.popupTip("Mode " ~ topMode,0.5);
               }

         </script>

      </binding>
   </mod-up>
</button>


The 'timer' and 'topMode' stuff in there is to cycle through stick modes -- something I'm messing with, that isn't done :) Basically, you click quickly on the button to change modes, OR you click and hold, to trim. It works well on all but the most touchy taildraggers.
This is a family-friendly saloon. No talk stink.
Kabuki
 
Posts: 587
Joined: Fri Oct 23, 2009 11:21 pm
Location: Usually on the ground, always in the sky, except when underwater.
Callsign: Kabuki
Version: 3.0.0
OS: Windows 7

Previous

Return to Development

Who is online

Users browsing this forum: No registered users and 4 guests