I would like to add 8 additional axles.
I added in descriptor.c in Joystick2Report
/* 8 axes, signed 16 bit resolution, the actualy resolution is still 10 bit range 0~65535 */
0xa1, 0x00, /* Collection (Physical) */
0x05, 0x01, /* Usage Page (Generic Desktop) */
0x09, 0x30, /* Usage (X) */
0x09, 0x31, /* Usage (Y) */
0x09, 0x32, /* Usage (Analog1) */
0x09, 0x33, /* Usage (Analog2) */
0x09, 0x34, /* Usage (Analog3) */
0x09, 0x35, /* Usage (Analog4) */
0x09, 0x36, /* Usage (Analog5) */
0x09, 0x37, /* Usage (Analog6) */
0x27, 0xff, 0xff, 0x00, 0x00, /* Logical Maximum (65535) */
0x47, 0xff, 0xff, 0x00, 0x00, /* Physical Maximum (65535) */
0x75, 16, /* Report Size (16) */
0x95, 8, /* Report Count (8) */
0x81, 0x82, /* Input (Data, Variable, Absolute, Volatile) */
0xc0, /* End Collection */
in Arduino-joystick.h int16_t axis[8] in USB_Joystick2Report_Data_t;
typedef struct {
int16_t axis[8];
#if HID_INTERFACENUMBER == 1
uint8_t button[32]; // each byte represent 8 button state
#else
uint8_t button[16]; // each byte represent 8 button state
#endif
} USB_Joystick1Report_Data_t;
typedef struct {
int16_t axis[8];
uint8_t button[16]; // each byte represent 8 button state
} USB_Joystick2Report_Data_t;
in CVP_JoystickController.ino I changed from
#define NUM_AXES 8
to
#define NUM_AXES 16
the computer sees the addition of these axes but they stay in place and I can't use them.
Could someone help me and tell me what else I need to change to activate all 16 axes?
I've been looking for a solution for 2 weeks but I can't find it
Thank you in advance.