Open jiangfei opened 1 year ago
my joystick.cpp include
if (includeXAxis == true) {
// USAGE (X)
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09;
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x30;
}
if (includeYAxis == true) {
// USAGE (Y)
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09;
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x31;
}
if (includeZAxis == true) {
// USAGE (Z)
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09;
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x32;
}
if (includeRxAxis == true) {
// USAGE (Rx)
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09;
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x33;
}
if (includeRyAxis == true) {
// USAGE (Ry)
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09;
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x34;
}
if (includeRzAxis == true) {
// USAGE (Rz)
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09;
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x35;
}
if (includeslider1 == true) {
// USAGE (slider1)
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09;
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x36;
}
if (includeslider2 == true) {
// USAGE (slider2)
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09;
tempHidReportDescriptor[hidReportDescriptorSize++] = 0x36;
}
but your code is different in variables ( 0x30,0x31 ... i.e.)
https://www.vkbcontrollers.com/pages/downloads use VKB JoyTester , Show_HID. search HID for Arduino micro(leonardo). 1) Remove joy 2) Delete all registry entry for HID Arduino micro(leonardo) in \HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaProperties\PrivateProperties\DirectInput\
\HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaProperties\PrivateProperties\Joystick\OEM\
3) and plug joystick again, calibrate
我的游戏杆. cpp包括
if (includeXAxis == true) { // USAGE (X) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x30; } if (includeYAxis == true) { // USAGE (Y) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x31; } if (includeZAxis == true) { // USAGE (Z) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x32; } if (includeRxAxis == true) { // USAGE (Rx) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x33; } if (includeRyAxis == true) { // USAGE (Ry) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x34; } if (includeRzAxis == true) { // USAGE (Rz) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x35; } if (includeslider1 == true) { // USAGE (slider1) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x36; } if (includeslider2 == true) { // USAGE (slider2) tempHidReportDescriptor[hidReportDescriptorSize++] = 0x09; tempHidReportDescriptor[hidReportDescriptorSize++] = 0x36; }
但是您的代码在变量(0x30,0x31...即]
https://www.vkbcontrollers.com/pages/downloads使用VKB JoyTester,Show_HID。搜索HID寻找Arduino micro(莱昂纳多)。
- 去除快乐
- 删除HID Arduino micro(leonardo)在中的所有注册表项\ HKEY _当前_用户\系统\当前控制集\控制\媒体属性\私有属性\方向输入\
\ HKEY _当前_用户\系统\当前控制集\控制\媒体属性\私人属性\操纵杆\OEM\
- 再次插上操纵杆,校准
Thank you very much. Eight joystick inputs were successfully implemented
After I changed the contents of the Jostick.cpp file, both throttles can be displayed in the game controller, but slider2 is not recognized in the DCS