我已经制作了一个报告如下的USB HID笔数字化仪设备:
////////////////////////////
// HID PEN DIGITIZER PART //
////////////////////////////
0x05, 0x0d, // USAGE_PAGE (Digitizers)
0x09, 0x01, // USAGE (Digitizers)
0xa1, 0x01, // COLLECTION (Application)
0x85, 0x02, // REPORT_ID(2)
0x09, 0x02, // USAGE (pen)
0xa1, 0x00, // COLLECTION (Physical)
// Tip Switch & In Range
0x09, 0x42, // USAGE (Tip Switch)
0x09, 0x32, // USAGE (In Range)
0x09, 0x3c, // USAGE (Invert)
0x09, 0x45, // USAGE (Eraser)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x04, // REPORT_COUNT (4)
0x81, 0x02, // INPUT (Data,Var,Abs)
// Padding
0x09, 0x00, // USAGE (Undefined / Padding)
0x75, 0x04, // REPORT_SIZE (4)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x01, // INPUT (Cnst,Ary,Abs)
// X & Y TILT
0x09, 0x3d, // USAGE (X tilt)
0x09, 0x3e, // USAGE (Y tilt)
0x15, 0xa6, // LOGICAL_MINIMUM (-90)
0x25, 0x5a, // LOGICAL_MAXIMUM (90)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x02, // REPORT_COUNT (2)
0x35, 0xa6, // PHYSICAL_MINIMUM (-90)
0x45, 0x5a, // PHYSICAL_MAXIMUM (90)
0x81, 0x02, // INPUT (Data,Var,Abs)
// Tip pressure
0x09, 0x30, // USAGE (PRESSURE)
0x16, 0x00, 0x00, // LOGICAL_MINIMUM (0)
0x26, 0xff, 0x0f, // LOGICAL_MAXIMUM (4095)
0x75, 0x10, // REPORT_SIZE (16)
0x95, 0x01, // REPORT_COUNT (1)
0x36, 0x00, 0x00, // PHYSICAL_MINIMUM (0)
0x46, 0xff, 0x00, // PHYSICAL_MAXIMUM (255)
0x81, 0x02, // INPUT (Data,Var,Abs)
// Generic desktop X, Y, Z
// X
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x16, 0xc8, 0x05, // LOGICAL_MINIMUM (1480)
0x26, 0x68, 0x47, // LOGICAL_MAXIMUM (18280)
0x75, 0x10, // REPORT_SIZE (16)
0x95, 0x01, // REPORT_COUNT (1)
0x55, 0x0d, // UNIT_EXPONENT (-3)
0x65, 0x11, // UNIT (en cm)
0x09, 0x30, // USAGE (X)
0x36, 0xC8, 0x05, // PHYSICAL_MINIMUM (1480)
0x46, 0x68, 0x47, // PHYSICAL_MAXIMUM (18280)
0x81, 0x02, // INPUT (Data,Var,Abs)
// Y
0x16, 0x34, 0x08, // LOGICAL_MINIMUM (2100)
0x26, 0x74, 0x36, // LOGICAL_MAXIMUM (13940)
0x75, 0x10, // REPORT_SIZE (16)
0x95, 0x01, // REPORT_COUNT (1)
0x55, 0x0d, // UNIT_EXPONENT (-3)
0x65, 0x11, // UNIT (en cm)
0x09, 0x31, // USAGE (Y)
0x36, 0x34, 0x08, // PHYSICAL_MINIMUM (2100)
0x46, 0x74, 0x36, // PHYSICAL_MAXIMUM (13940)
0x81, 0x02, // INPUT (Data,Var,Abs)
// Z
0x16, 0x00, 0x00, // LOGICAL_MINIMUM (0)
0x26, 0x10, 0x27, // LOGICAL_MAXIMUM (10000)
0x75, 0x10, // REPORT_SIZE (16)
0x95, 0x01, // REPORT_COUNT (1)
0x55, 0x0d, // UNIT_EXPONENT (-3)
0x65, 0x11, // UNIT (en cm)
0x09, 0x32, // USAGE (Z)
0x36, 0x00, 0x00, // PHYSICAL_MINIMUM (0)
0x46, 0x10, 0x27, // PHYSICAL_MAXIMUM (10000)
0x81, 0x02, // INPUT (Data,Var,Abs)
0xc0, // END_COLLECTION
0xc0, // END_COLLECTION
仅在MacOSX上使用应用程序时问题才会出现=笔压不起作用。 HID笔设备正常工作,“接触”正常,但是似乎未处理压力数据。接触打开后,压力始终处于全压力。
使用可以处理它的应用程序(Autodesk的SketchBook),笔压在Windows上效果很好,但在MacOSX上效果不佳。
有人在MacOSX上使用Pen设备遇到了类似的问题吗? 我该怎么做调试?