hal_input - where do input.0 pin names come from and what are their mappings

More
3 years 6 months ago #268345 by frogandspanner
I have set up an RPi Pico as a USB HID/Gamepad, and have been searching for the mappings from button number to input.0 pin name.

I have found linux_event.py, which defines the gamepad button names, such as "BTN_PINKIE" which do appear in the HAL config, plus lots of others, such as "BTN_0", which do not appear in Axis under Machine -> Show HAL Configuration  input.0

Where does hal_input get the button names and mappings from?

Please Log in to join the conversation.

More
3 years 6 months ago #268987 by frogandspanner
I have been investigating this by comparing what jstest-gtk showed with linuxcnc input.0.xyzzy . I attach what I have deduced. 

Attachment not found



 

Please Log in to join the conversation.

More
3 years 6 months ago #270134 by frogandspanner
One of the joys of ignorance is that there is so much pleasure in learning. The trouble is as you learn you realise there were much simpler ways of doing things.

gstest-gtk has a 'mapping' button, and that reveals what I wanted - except that suggests that button '16' maps to '704', with many similar strange mappings.

I think I have enough to be going with as I do not wish to have to become a USB expert - I have 50+ years of computer network experience, and USB is much more complex than the Intenet.

Please Log in to join the conversation.

Time to create page: 0.691 seconds
Powered by Kunena Forum