diff --git a/flight/PiOS/Common/pios_usb_desc_hid_cdc.c b/flight/PiOS/Common/pios_usb_desc_hid_cdc.c index ff4b9d4a1..f778bea04 100644 --- a/flight/PiOS/Common/pios_usb_desc_hid_cdc.c +++ b/flight/PiOS/Common/pios_usb_desc_hid_cdc.c @@ -51,7 +51,7 @@ static const struct usb_device_desc device_desc = { .bNumConfigurations = 1, }; -static const uint8_t hid_report_desc[127] = { +static const uint8_t hid_report_desc[103] = { HID_GLOBAL_ITEM_2 (HID_TAG_GLOBAL_USAGE_PAGE), 0x9C, 0xFF, /* Usage Page 0xFF9C (Vendor Defined) */ HID_LOCAL_ITEM_1 (HID_TAG_LOCAL_USAGE), @@ -111,10 +111,10 @@ static const uint8_t hid_report_desc[127] = { /* X + Y controls */ - HID_LOCAL_ITEM_4 (HID_TAG_LOCAL_USAGE), - 0x30, 0x00, 0x01, 0x00, /* Usage ID 0x00010030 (Generic Desktop: X) */ - HID_LOCAL_ITEM_4 (HID_TAG_LOCAL_USAGE), - 0x31, 0x00, 0x01, 0x00, /* Usage ID 0x00010031 (Generic Desktop: Y) */ + HID_LOCAL_ITEM_1 (HID_TAG_LOCAL_USAGE), + 0x30, /* Usage ID 0x00010030 (Generic Desktop: X) */ + HID_LOCAL_ITEM_1 (HID_TAG_LOCAL_USAGE), + 0x31, /* Usage ID 0x00010031 (Generic Desktop: Y) */ HID_GLOBAL_ITEM_1 (HID_TAG_GLOBAL_LOGICAL_MIN), 0x00, /* Values range from min = 0x00 */ HID_GLOBAL_ITEM_4 (HID_TAG_GLOBAL_LOGICAL_MAX), @@ -128,10 +128,10 @@ static const uint8_t hid_report_desc[127] = { /* Y + Rx controls */ - HID_LOCAL_ITEM_4 (HID_TAG_LOCAL_USAGE), - 0x32, 0x00, 0x01, 0x00, /* Usage ID 0x00010032 (Generic Desktop: Z) */ - HID_LOCAL_ITEM_4 (HID_TAG_LOCAL_USAGE), - 0x33, 0x00, 0x01, 0x00, /* Usage ID 0x00010031 (Generic Desktop: Rx) */ + HID_LOCAL_ITEM_1 (HID_TAG_LOCAL_USAGE), + 0x32, /* Usage ID 0x00010032 (Generic Desktop: Z) */ + HID_LOCAL_ITEM_1 (HID_TAG_LOCAL_USAGE), + 0x33, /* Usage ID 0x00010031 (Generic Desktop: Rx) */ HID_GLOBAL_ITEM_1 (HID_TAG_GLOBAL_LOGICAL_MIN), 0x00, /* Values range from min = 0x00 */ HID_GLOBAL_ITEM_4 (HID_TAG_GLOBAL_LOGICAL_MAX), @@ -145,14 +145,14 @@ static const uint8_t hid_report_desc[127] = { /* Ry, Rz, Slider + Dial controls */ - HID_LOCAL_ITEM_4 (HID_TAG_LOCAL_USAGE), - 0x34, 0x00, 0x01, 0x00, /* Usage ID 0x00010034 (Generic Desktop: Ry) */ - HID_LOCAL_ITEM_4 (HID_TAG_LOCAL_USAGE), - 0x35, 0x00, 0x01, 0x00, /* Usage ID 0x00010035 (Generic Desktop: Rz) */ - HID_LOCAL_ITEM_4 (HID_TAG_LOCAL_USAGE), - 0x36, 0x00, 0x01, 0x00, /* Usage ID 0x00010036 (Generic Desktop: Slider) */ - HID_LOCAL_ITEM_4 (HID_TAG_LOCAL_USAGE), - 0x37, 0x00, 0x01, 0x00, /* Usage ID 0x00010037 (Generic Desktop: Dial) */ + HID_LOCAL_ITEM_1 (HID_TAG_LOCAL_USAGE), + 0x34, /* Usage ID 0x00010034 (Generic Desktop: Ry) */ + HID_LOCAL_ITEM_1 (HID_TAG_LOCAL_USAGE), + 0x35, /* Usage ID 0x00010035 (Generic Desktop: Rz) */ + HID_LOCAL_ITEM_1 (HID_TAG_LOCAL_USAGE), + 0x36, /* Usage ID 0x00010036 (Generic Desktop: Slider) */ + HID_LOCAL_ITEM_1 (HID_TAG_LOCAL_USAGE), + 0x37, /* Usage ID 0x00010037 (Generic Desktop: Dial) */ HID_GLOBAL_ITEM_1 (HID_TAG_GLOBAL_LOGICAL_MIN), 0x00, /* Values range from min = 0x00 */ HID_GLOBAL_ITEM_4 (HID_TAG_GLOBAL_LOGICAL_MAX), @@ -168,7 +168,7 @@ static const uint8_t hid_report_desc[127] = { HID_MAIN_ITEM_0 (HID_TAG_MAIN_ENDCOLLECTION), -/* 127 bytes to here */ +/* 103 bytes to here */ }; struct usb_config_hid_cdc {