virusmater / evdev-joystick-calibration Goto Github PK
View Code? Open in Web Editor NEWRun, pick up the gamepad and turn sticks with triggers around
Run, pick up the gamepad and turn sticks with triggers around
Hi,
I wanted to use the script to calibrate a device that has two axes only but no buttons. Because of that, I'm unable to end the calibration.
Any chance a "default" non-controller key can be added to end the calibration manually? Enter does already confirm the results for an axis, so maybe the whole behaviour can be changed? E.g.: "E" to exit, "C" confirm", and "R" to restart?
I have an old joystick and I use rockfire's gameport to usb adapter. And it recognizes the joystick with the following name: "Padix Co. Ltd. 4-axis,4button joystick w/view finder"
When the application saves the settings, the following error occurs "FileNotFoundError: [Errno 2] No such file or directory: '/home/marciocr/.config/evdev-joystick-calibration/PadixCo.Ltd.4-axis,4buttonjoystickw/viewfinder .json'"
I believe that because the device name has "," and "/" the application is not able to save the configuration file.
I needed deadzone calibration too. Its a heuristic but if you're interested, feel free to PR or merge or whatever.
The branch:
https://github.com/nick-l-o3de/evdev-joystick-calibration/tree/add_basic_deadzone_calibration
To PR or compare it:
https://github.com/nick-l-o3de/evdev-joystick-calibration/pull/new/add_basic_deadzone_calibration
$ sudo evdev-joystick-calibration
Available devices:
2 Logitech Logitech Extreme 3D
Pick one device for the calibration: 2
Move sticks and triggers of Logitech Logitech Extreme 3D to max and min positions.
Press any button to apply.
Configuration for Logitech Logitech Extreme 3D
analog: ABS_X min:0 max:1023
Traceback (most recent call last):
File "/usr/bin/evdev-joystick-calibration", line 33, in <module>
sys.exit(load_entry_point('evdev-joystick-calibration==0.1', 'console_scripts', 'evdev-joystick-calibration')())
File "/usr/lib/python3.9/site-packages/evdev_joystick_calibration/__main__.py", line 65, in main
configuration.apply(device, min_max)
File "/usr/lib/python3.9/site-packages/evdev_joystick_calibration/configuration.py", line 31, in apply
dev.set_absinfo(int(conf_code), min=conf[conf_code].minimum, max=conf[conf_code].maximum)
AttributeError: 'InputDevice' object has no attribute 'set_absinfo'
probably since that's only in python-evdev
since version 1.3.0 while you don't depend on any specific version.
manually upgrading with pip install -U evdev
did the trick, you might wanna update your dependencies
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.