none
Touch coordinate is wrong in wince 7 RRS feed

  • Question

  • Dear all: 

    I have a capacitive touch device, and the maximum coordinate of x and y is 4095(logical maximum).

    In wince, the touch driver need to report xRangeMax and yRangeMax of tch_props structure to os

    Here is my calculaion:

    1.Get screen resolution (width, height) = (1024, 768), and get the maximum value between them.

    2.Since the x-axis corresponds to width, xRangeMax = 4095, and yRangeMax = ((4095*768)/1024) = 3071

       {(1024:768 = 4095 : yRangeMax)}.

    This method is working when screen resolution is 1024*768, but failed in 640*480.

    If xRangeMax and yRangeMax both report 4096, the error remains.

    what happen about this situation?

    best regards,
    Victor

    Tuesday, October 18, 2016 4:03 PM

All replies

  • Hi Cedric,

    Have you used the touch calibration app to ensure your numbers are actually set correctly in the OS?

    Sincerely,

    IoTGirl

    Tuesday, October 18, 2016 4:38 PM
    Moderator
  • Hi IoTGirl : 

    I use calibration tool in the control panel, after calibration the error still remains.

    Thanks for your help

    Victor


    Wednesday, October 19, 2016 1:42 AM
  • Hi Cedric,

    Are you the OEM of the device? You should really follow up with either the device manufacture or company that sld you the device for support.

    It sounds like the OS is not getting the correct co-ordinates when you change screen resolution.  You and the OEM should step through your code and discover what APIs are reporting the values and ensure the system has the correct settings.

    Sincerely,

    IoTGirl

    Wednesday, October 19, 2016 5:08 PM
    Moderator
  • Hi IoTGirl :

    I get a solution.

    For example:

    If screen solution is 800*600, then I set xRangeMax = (800 * 4) = 3200

    and yRangeMax = (600 * 4) = 2400.

    If my touch device send (x, y) = (1000, 786) to my driver, I convert x from 1000 to 781  ((3200*1000)/4095)

    and y from 786 to 460 ((2400*786)/4095), then send to wince os.

    This solution work on 1024*768, 640*480, 800*600.

    But I don't know why? Can you explain for me?

    Thank for your help,

    Cedric

    Thursday, October 20, 2016 2:41 AM