Page 2 of 2

Re: Contribue joystick mappings

Posted: Thu May 23, 2013 5:56 pm
by allynbauer
beat wrote: For thrust only the upper half of the stick range can be used.
Why's that?

Re: Contribue joystick mappings

Posted: Mon May 27, 2013 11:41 am
by beat
allynbauer wrote:
beat wrote: For thrust only the upper half of the stick range can be used.
Why's that?
The controller reports values between about 0x20 (right/up) and 0xE0 (left/down) on all axes. With a scale of -1 this works perfectly for pitch, roll, and yaw. For thrust, it seems the PC client does the same mapping to a signed value as for the other axes, but then only considers positive numbers as valid. All numbers reported for the lower half of the stick range (0x80 - 0xE0) are mapped to zero.
Using a scale of -1.2 stretches the upper half of the range enough to enable flying, but using the full range would allow more precise control.
An additional 'offset' option, similar to 'scale', would allow to map reported range to used range correctly in any case.

Re: Contribue joystick mappings

Posted: Mon May 27, 2013 7:51 pm
by Rnold
Here are the settings for the Speedlink Strike FX. I had to reverse the Pitch (scale=-1.0). I wanted it to be compatible with my RC equipment so I swapped the pitch/roll and thrust/yaw buttons. I noticed that maximum thrust is about 80%. I set the "max thrust" to 100 in the config.json but that didn't help. Is there a way to set it at 100%?

Code: Select all

{
  "inputconfig": {
    "inputdevice": {
      "updateperiod": 10, 
      "name": "Generic_OS_X", 
      "axis": [
        {
          "scale": 1.0, 
          "type": "Input.AXIS", 
          "name": "yaw", 
          "key": "yaw", 
          "id": 0
        }, 
        {
          "scale": 1.0, 
          "type": "Input.AXIS", 
          "name": "thrust", 
          "key": "thrust", 
          "id": 1
        }, 
        {
          "scale": 0.5, 
          "type": "Input.AXIS", 
          "name": "roll", 
          "key": "roll", 
          "id": 2
        }, 
        {
          "scale": -0.5, 
          "type": "Input.AXIS", 
          "name": "pitch", 
          "key": "pitch", 
          "id": 3
        }, 
        {
          "scale": -1.0, 
          "type": "Input.BUTTON", 
          "id": 2, 
          "key": "pitchcal", 
          "name": "pitchNeg"
        }, 
        {
          "scale": 1.0, 
          "type": "Input.BUTTON", 
          "id": 0, 
          "key": "pitchcal", 
          "name": "pitchPos"
        }, 
        {
          "scale": 1.0, 
          "type": "Input.BUTTON", 
          "id": 9, 
          "key": "estop", 
          "name": "killswitch"
        }, 
        {
          "scale": -1.0, 
          "type": "Input.BUTTON", 
          "id": 3, 
          "key": "rollcal", 
          "name": "rollNeg"
        }, 
        {
          "scale": 1.0, 
          "type": "Input.BUTTON", 
          "id": 1, 
          "key": "rollcal", 
          "name": "rollPos"
        }, 
        {
          "scale": 1.0, 
          "type": "Input.BUTTON", 
          "id": 8, 
          "key": "exit", 
          "name": "exitapp"
        }
      ]
    }
  }
}

Re: Contribue joystick mappings

Posted: Tue May 28, 2013 2:33 pm
by allynbauer
beat wrote:For thrust, it seems the PC client does the same mapping to a signed value as for the other axes, but then only considers positive numbers as valid.
Indeed. The existing client assumes several things. One is that axis values will be in the range -1 to 1. Another is that the user will be using a controller which has joysticks that 'reset' to neutral/0. Since negative thrust doesn't make much sense, it is thrown out.
beat wrote:The controller reports values between about 0x20 (right/up) and 0xE0 (left/down) on all axes.
So you are saying your controller returns axis values in the (decimal) range 32-224?

Re: Contribue joystick mappings

Posted: Tue May 28, 2013 3:54 pm
by beat
allynbauer wrote:So you are saying your controller returns axis values in the (decimal) range 32-224?
Yes.
The values are not exactly the same for all axes and they depend slightly on the (mechanical) trimming, but it is always about the given range.

Re: Contribue joystick mappings

Posted: Sat Jun 01, 2013 8:55 am
by 863456346
Would it be possible to turn on the vibration of the controller as soon as the red LED indicates the battery is empty? This could be very useful when flying outdoors.

Re: Contribue joystick mappings

Posted: Sun Jun 02, 2013 4:23 pm
by Smitty79
Anyone tried using the Interlink Elite Controller by Futaba? It comes with the RealFlight R/C Flight Simulator.

http://www.realflight.com/interlink.html

Re: Contribue joystick mappings

Posted: Tue Jun 04, 2013 7:01 pm
by georg
I have obtained a Logitech F310 controller.
Successfully set it up on Ubuntu 13.04

My config file

Code: Select all

{
  "inputconfig": {
    "inputdevice": {
      "updateperiod": 10, 
      "name": "Logitech_F310", 
      "axis": [
        {
          "scale": -1.0, 
          "type": "Input.AXIS", 
          "name": "thrust", 
          "key": "thrust", 
          "id": 1
        }, 
        {
          "scale": 1.0, 
          "type": "Input.AXIS", 
          "name": "yaw", 
          "key": "yaw", 
          "id": 0
        }, 
        {
          "scale": 1.0, 
          "type": "Input.AXIS", 
          "name": "roll", 
          "key": "roll", 
          "id": 3
        }, 
        {
          "scale": -1.0, 
          "type": "Input.AXIS", 
          "name": "pitch", 
          "key": "pitch", 
          "id": 4
        }, 
        {
          "scale": -1.0, 
          "type": "Input.BUTTON", 
          "id": 0, 
          "key": "pitchcal", 
          "name": "pitchNeg"
        }, 
        {
          "scale": 1.0, 
          "type": "Input.BUTTON", 
          "id": 3, 
          "key": "pitchcal", 
          "name": "pitchPos"
        }, 
        {
          "scale": 1.0, 
          "type": "Input.BUTTON", 
          "id": 6, 
          "key": "estop", 
          "name": "killswitch"
        }, 
        {
          "scale": -1.0, 
          "type": "Input.BUTTON", 
          "id": 2, 
          "key": "rollcal", 
          "name": "rollNeg"
        }, 
        {
          "scale": 1.0, 
          "type": "Input.BUTTON", 
          "id": 1, 
          "key": "rollcal", 
          "name": "rollPos"
        }, 
        {
          "scale": 1.0, 
          "type": "Input.BUTTON", 
          "id": 7, 
          "key": "exit", 
          "name": "exitapp"
        }
      ]
    }
  }
}


Re: Contribue joystick mappings

Posted: Fri Jun 07, 2013 10:44 am
by tobias
Would it be possible to turn on the vibration of the controller as soon as the red LED indicates the battery is empty? This could be very useful when flying outdoors.
This is something we have also been asking. I think the problem is the gamepad driver layer which doesn't always have rumble support. Would be great to have though.