Skip to content

Conversation

DavideLentini
Copy link

Hi , with this pid and vid I was able to use my Taranis X9D radio as a joypad.
However, my configuration has some problems.
I mainly focused on the first 4 channels , so the others are still to be defined .

Channel1=Roll(stick1_horizontal)
Channel2=Pitch(stick1_vertical)
Channel3=Throttle(stick2_vertical)
Channel4=yaw(stick2_horizontal)

I can get the channels correctly on the drone , but somehow the range (which we normally have as 1100 minimum , 1900 maximum and 1515 normal) seems to be very narrow , in fact the minimum is 1502 , the maximum 1529 and the normal 1515, so for all 4 channels.

@CLAassistant
Copy link

CLAassistant commented Feb 16, 2024

CLA assistant check
All committers have signed the CLA.

@ntamas
Copy link
Member

ntamas commented Feb 16, 2024

Check the range of values sent by the joypad in the HID report when the sticks are in their end positions. The assumption is that they are in the range 0..255 or -128..127, depending on whether the value is signed or not. Also, they are mapped to the range 0..65535 by the extension as the fact that MAVLink uses 1000..2000 is purely a MAVLink-specific implementation detail so it is not the job of this extension to map the values to the 1000..2000 range.

Use the in_range and out_range keys in the JSON specification to control the range used by the HID report (in_range) and the range that the HID report values are mapped to (out_range). See here for the corresponding code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants