-
Notifications
You must be signed in to change notification settings - Fork 53
Fix Joystick HID detection, add ADC Joystick mode, fix build on MacOS #408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
5f37a2c
1d1189f
ed4076d
390c649
72d5f03
930a988
b370c2e
4a44259
08dfe4a
0a0314f
5910bee
345c30a
cf53509
57d4045
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,34 +112,27 @@ __ALIGN_BEGIN static const uint8_t HID_JOYSTICK_ReportDesc[] __ALIGN_END = | |
| 0x05, 0x01, // USAGE_PAGE (Generic Desktop) | ||
| 0x09, 0x04, // USAGE (Joystick) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is 0x05 in EdgeTX, I'm not against the change but is there a specific reason to change it?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Value from original firmware, IMHO more suitable for the use. Doesn't do much however.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As this is port of OpenTX/EdgeTX and there is no specific reason to change that, it should stay as it was. |
||
| 0xa1, 0x01, // COLLECTION (Application) | ||
| 0xa1, 0x00, // COLLECTION (Physical) | ||
|
|
||
| 0x05, 0x01, // USAGE_PAGE (Generic Desktop) | ||
| 0x09, 0x30, // USAGE (X) | ||
| 0x09, 0x31, // USAGE (Y) | ||
| 0x09, 0x32, // USAGE (Z) | ||
| 0x09, 0x33, // USAGE (Rx) | ||
| 0x09, 0x34, // USAGE (Ry) | ||
| 0x09, 0x35, // USAGE (Rz) | ||
| 0x09, 0x36, // USAGE (Slider) | ||
| 0x09, 0x37, // USAGE (Slider) | ||
| 0x16, 0x00, 0x00, // LOGICAL_MINIMUM (0) | ||
| 0x26, 0xFF, 0x07, // LOGICAL_MAXIMUM (2047) | ||
| 0x75, 0x10, // REPORT_SIZE (16) | ||
| 0x95, 0x08, // REPORT_COUNT (8) | ||
| 0x15, 0x81, // LOGICAL_MINIMUM (-127) | ||
| 0x25, 0x7F, // LOGICAL_MAXIMUM (127) | ||
| 0x75, 0x08, // REPORT_SIZE (8) | ||
| 0x95, 0x06, // REPORT_COUNT (6) | ||
| 0x81, 0x02, // INPUT (Data,Var,Abs) | ||
|
|
||
| 0x05, 0x09, // USAGE_PAGE (Button) | ||
| 0x19, 0x01, // USAGE_MINIMUM (Button 1) | ||
| 0x29, 0x10, // USAGE_MAXIMUM (Button 16) | ||
| 0x29, 0x08, // USAGE_MAXIMUM (Button 8) | ||
| 0x15, 0x00, // LOGICAL_MINIMUM (0) | ||
| 0x25, 0x01, // LOGICAL_MAXIMUM (1) | ||
| 0x95, 0x10, // REPORT_COUNT (16) | ||
| 0x75, 0x01, // REPORT_SIZE (1) | ||
| 0x95, 0x08, // REPORT_COUNT (8) | ||
| 0x81, 0x02, // INPUT (Data,Var,Abs) | ||
|
|
||
| 0xc0, // END_COLLECTION | ||
| 0xc0 // END_COLLECTION | ||
| 0xc0, // END_COLLECTION | ||
| }; | ||
|
|
||
|
|
||
|
|
@@ -248,7 +241,7 @@ __ALIGN_BEGIN static const uint8_t USBD_HID_CfgDesc[USB_HID_CONFIG_DESC_SIZ] __A | |
|
|
||
| HID_IN_EP, /*bEndpointAddress: Endpoint Address (IN)*/ | ||
| 0x03, /*bmAttributes: Interrupt endpoint*/ | ||
| HID_IN_PACKET, /*wMaxPacketSize: 4 Byte max */ | ||
| 0x40, /*wMaxPacketSize: 4 Byte max */ | ||
| 0x00, | ||
| 0x07, /*bInterval: Polling Interval (7 ms)*/ | ||
ajjjjjjjj marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| /* 34 */ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.