MHeironimus / ArduinoJoystickLibrary

An Arduino library that adds one or more joysticks to the list of HID devices an Arduino Leonardo or Arduino Micro can support.
GNU Lesser General Public License v3.0
2.14k stars 412 forks source link

It is possible change HID code of a axis? #49

Open GuilhermeMoserManerichi opened 7 years ago

GuilhermeMoserManerichi commented 7 years ago

I'm creating a Driving simulator, but there's no clutch at the library. I thought that changing de HID descriptor code at Joystick.cpp would resolve my problem, like change the:

    if (includeRudder == true) {
        // USAGE (Rudder)
        tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09;
        tempHidReportDescriptor[hidReportDescriptorSize++] = 0xBA;
    }

to:

    if (includeRudder == true) {
        // USAGE (Rudder)
        tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09;
        tempHidReportDescriptor[hidReportDescriptorSize++] = 0xC6;
    }

But this not work. The axis disappear:

clutch try

Anybody has some idea how to change it?

Thanks, Guilherme

MHeironimus commented 7 years ago

I am going to classify this as a feature enhancement request: Add a Clutch to the Joystick library. I will probably try to add a Shifter as well.

mieperDE commented 6 years ago

Additional axis would be great.