Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Joystick dead zone in Linux with Taranis

A topic by umscht created Jan 03, 2017 Views: 2,425 Replies: 6
Viewing posts 1 to 2

Hey there,

I'm running FPVFreerider Recharged on a Ubuntu 16.04 Laptop in combination with a Taranis X9D Plus, connected via USB. The simulator and the Taranis worked fine out of the box, however I realized that there is a dead zone of +/-12% around the center of both joysticks on my Taranis.

I use "linear" control in the custom settings and tried various Expo settings on the Taranis with no difference. The "Dead zone" setting of the simulator itself is turned off.

Anybody experienced something similar, or has an idea what may be wrong?

All the best and a happy new year,
Stefan

Hey again,

it only took another night of sleep and some further research to solve my issue... so everything is working fine now. Sorry for apparently not doing enough research before asking questions.

Everybody having the same issues with their Taranis connected via USB to their Linux machine may want to take a look at the openTX wiki on GitHub: https://github.com/opentx/opentx/wiki/OpenTX-USB-J...

According to this wiki page, the joystick driver by default adds some dead zone to the sticks around their center position. In my case, running "jscal -c /dev/input/js0" and recalibrating the Taranis within Linux did the trick and removed the dead zones.

All the best,
Stefan

PS: Keep up the great work! Also big thanks for supporting Linux.

Developer

Glad to hear that you managed to find a solution. Thanks for posting the information, I'm sure that will be of help to others who might encounter the same issue.I will add that to the download instructions of the Linux version.

(2 edits)

Thanks for your reply! Great to see a friendly and active community behind this simulator!

I'm currently taking a second look at the Taranis joystick integration and it seems like I have 8 analog channels and 24 buttons available. Since I can configure 32 channels in the mixer within the Taranis, it seems like the channels of my model are mapped to joystick buttons on the computer. Really great design choice by the opentx developers in my opinion! This way I can freely configure any switch on my Taranis to trigger what ever virtual button I like. I'm currently investigating how to map the buttons to keys and finally to actions in FPVFreerider.

I have another question that came up during the last couple of days regarding the joystick calibration within FPVFreerider. I extracted my specific joystick settings after I calibrated it in my operating system. After I plug in my Taranis, I run a script that restores that specific settings as explained in the opentx wiki entry I linked in the previous post. Now, when I then start FPVFreerider and skip the calibration step to see the controller actions, all joysticks are fine out of the box as long as they are in their center position during startup of FPVFreerider. However, I usually have the throttle stick at bottom position when I start the simulator and thus it interprets this position as center position. So I have two choices to go: either center the throttle stick before starting FPVFreerider, or calibrate my controller every time I run FPVFreerider. It's not a big issue, however, I wondered if turning off the internal calibration in FPVFreerider would result in a just fine setup, which doesn't need manual interaction every time I run it. Do you think adding a checkbox to allow the user to turn on/off the internal controller calibration in FPVFreerider would be an option?

All the best,
Stefan

Developer

You can map the keyboard shortcuts to a switch on your transmitter using:

http://www.lgdb.org/tool/antimicro (Linux)

http://joytokey.net/en/ (Windows)

Regarding the second question - I would be hesitant to add a function to turn off the internal calibration in Freerider since it would mainly just risk causing trouble to 99,5% of the users.

However you might be able to create a script that will reset them (or set them to a specific value). I believe the calibration values can be found somewhere under /home/your user/.config/unity3d

Thanks for the links. I'm following the other topics, too, so I already stumbled across them. Antimicro is not part of the standard repository, so I tried to avoid it for my first try. The joystick package seems to provide everything relevant expect an user interface ;)

Thanks for the hint towards the calibration file, I'll take a look at it as soon as I find some time. I understand that a checkbox is maybe confusing people more than it helps. However, I would be happy to solve the calibration issue. What about a command-line parameter to turn internal calibration off?

As a software developer I'm very curious to take a look into the code and figure out how it works and what's going wrong. Is there any option to get access to the source code? Are you interested in getting help from other developers?

All the best,
Stefan

Developer

I guess a command line parameter might be possible, although as far as I know it is not so easy to read custom command line parameters in a standalone Unity build. Think a plugin might be needed, and, it may not work equally on all operating systems. So, it's not a path I would want to go unless it's absolutely necessary.

Since I use Unity for development I do not have direct access to the input, I use Unity's input manager. So, if it is correct as I read on another forum (that there is some kind of bug in Unity's joystick input on Linux) there might not be so much I can do about it myself. It would in that case be something that the Unity team would need to look into.

Hope the stored calibration values can be useful as a possible work-around.