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
10%
Yes, I edited an existing config by hand
40
77%
I used the (new) configuration dialog to create a custom config for my joystick
7
13%
 
Total votes : 52

Re: Customised joystick configs

Postby sanhozay » Mon Apr 21, 2014 7: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 12:57 pm
Location: EGNM
Callsign: G-SHOZ
Version: Git
OS: Ubuntu 16.04

Re: Customised joystick configs

Postby hvengel » Mon Apr 21, 2014 8: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: 1127
Joined: Sun Dec 24, 2006 5:35 am
Location: Minden Nevada

Re: Customised joystick configs

Postby Philosopher » Mon Apr 21, 2014 8: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 10: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
Philosopher
 
Posts: 1593
Joined: Sun Aug 12, 2012 7:29 pm

Re: Customised joystick configs

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

sanhozay wrote in Mon Apr 21, 2014 7: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: 584
Joined: Sat Oct 24, 2009 12:21 am
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 10: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: 584
Joined: Sat Oct 24, 2009 12:21 am
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 CaptainCrazyAviation » Wed Nov 27, 2019 3:57 pm

Is it possible if you could add a thrust reverser because I have to press fn + del in order to engage and they are like on the 2 ends of the computer and I have to keep one hand on the joystick to remain aligned. Thanks.
CaptainCrazyAviation
 
Posts: 40
Joined: Mon Oct 07, 2019 10:58 am

Re: Customised joystick configs

Postby Johan G » Thu Nov 28, 2019 11:23 pm

CaptainCrazyAviation wrote in Wed Nov 27, 2019 3:57 pm:Is it possible if you could add a thrust reverser because I have to press fn + del in order to engage and they are like on the 2 ends of the computer [...]

These articles on the FlightGear wiki might give some inspiration:
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)
Some YouTube videos
Johan G
Moderator
 
Posts: 6625
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Previous

Return to Development

Who is online

Users browsing this forum: No registered users and 7 guests