Why's that?beat wrote: For thrust only the upper half of the stick range can be used.
Contribue joystick mappings
-
- Beginner
- Posts: 12
- Joined: Mon May 06, 2013 6:59 pm
Re: Contribue joystick mappings
Re: Contribue joystick mappings
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.allynbauer wrote:Why's that?beat wrote: For thrust only the upper half of the stick range can be used.
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
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"
}
]
}
}
}
-
- Beginner
- Posts: 12
- Joined: Mon May 06, 2013 6:59 pm
Re: Contribue joystick mappings
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: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.
So you are saying your controller returns axis values in the (decimal) range 32-224?beat wrote:The controller reports values between about 0x20 (right/up) and 0xE0 (left/down) on all axes.
Re: Contribue joystick mappings
Yes.allynbauer wrote:So you are saying your controller returns axis values in the (decimal) range 32-224?
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
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
Anyone tried using the Interlink Elite Controller by Futaba? It comes with the RealFlight R/C Flight Simulator.
http://www.realflight.com/interlink.html
http://www.realflight.com/interlink.html
10DOF Crazyflie, Wireless Xbox360 Controller
Raspberry Pi Base Station with ADAFRUIT INDUSTRIES RGB NEGATIVE 16X2 LCD + KEYPAD KIT
Raspberry Pi Base Station with ADAFRUIT INDUSTRIES RGB NEGATIVE 16X2 LCD + KEYPAD KIT
Re: Contribue joystick mappings
I have obtained a Logitech F310 controller.
Successfully set it up on Ubuntu 13.04
My config file
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"
}
]
}
}
}
- Attachments
-
- Logitech_F310.json.zip
- (414 Bytes) Downloaded 282 times
Re: Contribue joystick mappings
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.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.