Skip to content
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

How to create digitizer device with pressure #18

Open
GoogleCodeExporter opened this issue Apr 6, 2015 · 0 comments
Open

How to create digitizer device with pressure #18

GoogleCodeExporter opened this issue Apr 6, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

How to create digitizer device with pressure?

I changed the report in vmulti.h as follow, and add value "BYTE Pressure" to 
digitizer structure in vmulticommon.h but when i send a messages to the driver, 
pressure not work. I try to draw in Gimp and MyPaint.

The digitizer report:

/
// Digitizer report starts here
//
    0x05, 0x0d,                         // USAGE_PAGE (Digitizers)
    0x09, 0x02,                         // USAGE (Pen digitizer)
    0xa1, 0x01,                         // COLLECTION (Application)
    0x85, REPORTID_DIGI,                //   REPORT_ID (Digi)
    0x05, 0x0d,                         //   USAGE_PAGE (Digitizers)
    0x09, 0x20,                         //   USAGE (Stylus)
    0xa1, 0x00,                         //   COLLECTION (Physical)
    0x09, 0x42,                         //     USAGE (Tip Switch)
    0x09, 0x32,                         //     USAGE (In Range)
    0x15, 0x00,                         //     LOGICAL_MINIMUM (0)
    0x25, 0x01,                         //     LOGICAL_MAXIMUM (1)
    0x75, 0x01,                         //     REPORT_SIZE (1)
    0x95, 0x02,                         //     REPORT_COUNT (2)
    0x81, 0x02,                         //     INPUT (Data,Var,Abs)
    0x75, 0x01,                         //     REPORT_SIZE (1)
    0x95, 0x06,                         //     REPORT_COUNT (6)
    0x81, 0x01,                         //     INPUT (Cnst,Ary,Abs)
    0x05, 0x01,                         //     USAGE_PAGE (Generic Desktop)
    0x26, 0xff, 0x7f,                   //     LOGICAL_MAXIMUM (32767)       
    0x75, 0x10,                         //     REPORT_SIZE (16) 
    0x95, 0x01,                         //     REPORT_COUNT (1)            
    0x55, 0x0F,                         //     UNIT_EXPONENT (-1)           
    0x65, 0x11,                         //     UNIT (cm,SI Linear)                  
    0x35, 0x00,                         //     PHYSICAL_MINIMUM (0)         
    0x45, 0x00,                         //     PHYSICAL_MAXIMUM (0)
    0x09, 0x30,                         //     USAGE (X)                    
    0x81, 0x02,                         //     INPUT (Data,Var,Abs)         
    0x09, 0x31,                         //     USAGE (Y)                    
    0x81, 0x02,                         //     INPUT (Data,Var,Abs)

    0x05, 0x0d,                         //     USAGE_PAGE (Digitizers)      
    0x09, 0x30,                         //     USAGE (Tip Pressure)         
    0x26, 0xff, 0x00,                   //     LOGICAL_MAXIMUM (255)        
    0x81, 0x02,                         //     INPUT (Data,Var,Abs)         
    0xc0,                               //   END_COLLECTION
    0xc0,                               // END_COLLECTION


//
// Digitizer specific report infomation
//

#define DIGI_TIPSWITCH_BIT    1
#define DIGI_IN_RANGE_BIT     2

#define DIGI_MIN_COORDINATE   0x0000
#define DIGI_MAX_COORDINATE   0x7FFF

#pragma pack(1)
typedef struct _VMULTI_DIGI_REPORT
{

    BYTE      ReportID;

    BYTE      Status;

    USHORT    XValue;

    USHORT    YValue;

    BYTE Pressure;

} VMultiDigiReport;
#pragma pack()


What wrong?

Original issue reported on code.google.com by [email protected] on 4 Sep 2013 at 6:32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant