This is a graphical program to quickly calibrate range and deadzones of joysticks.
-
Run the program.
-
On the application window, select the tab up top, for the desired input device.
-
Move the sticks to their extreme positions, press the analog triggers all the way and release. The application will detect the minimum and maximum values.
-
If needed, manually adjust the Flat parameter; that is the dead zone. You can change how the Flat region is displayed (around zero, or centered in the min-max range) by clicking on the Flat button.
-
Click Apply on the top to apply the calibration to all axes. Or you can use the Apply for each axis individually.
-
Optional: click Save to permanently store this calibration to
~/.config/calibrate-joystick/db/. Only the values that were actually applied to the device will be saved. Whenever you insert that same device again, the saved calibration will be applied.
Note: input devices are enumerated through udev. Only devices with the property
ID_INPUT_JOYSTICK=1are processed. If your joystick isn't shown, use this command to inspect it:udevadm info /dev/input/eventN
where
eventNis the desired device. Udev uses heuristics to guess which devices are joysticks, but this can be overridden with udev rules.For security reasons, udev only allows users direct access to devices with the
uaccesstag. If your device was not tagged withuaccess, either create a custom udev rule to tag it withuaccess, or runcalibrate-joystickwith sudo/root permissions.
The program can also be run as a daemon:
calibrate-joystick -d
The main window will stay hidden until an input device is inserted. Closing the window won't stop the daemon, it must be explicitly closed through the Quit daemon button.
-
A C++20 compiler. This is often installed through a meta package (or package group) like
task-c++-devel,build-essentialorc-developmentin your package manager.Some distros also need manual installation of C development tools like:
autoconfautomakeautopointintltoollibtoolpkg-config
-
gtkmm-3.0: usually available as a package in your distro (you need the "dev" or "devel" package.)
-
libevdev: usually available as a package in your distro (you need the "dev" or "devel" package.)
-
libgudev: usually available as a package in your distro (you need the "dev" or "devel" package.)
If cloning the repository, make sure to enable submodules:
-
with Mercurial:
hg clone https://github.com/dkosmari/calibrate-joystick.git
-
with git:
git clone --recurse-submodules --shallow-submodules https://github.com/dkosmari/calibrate-joystick.git
If you downloaded a release tarball, you can skip step 0.
./bootstrap./configuremake- (Optional)
sudo make install
This software uses Automake, so the standard Automake build options apply. Check the
INSTALL file and the ./configure --help command for more details.
To run without installing, use either:
make runmake run-daemon
Note that installation is necessary for languages and desktop notifications to work.
To uninstall, run:
sudo make uninstall

