Bug 101474 - [PATCH] doc: Fix mistake in Matrix example to relect only X along Y axis
Summary: [PATCH] doc: Fix mistake in Matrix example to relect only X along Y axis
Status: CLOSED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Peter Hutterer
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-17 00:00 UTC by Philippe Coval
Modified: 2017-06-20 14:41 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
0001-doc-Fix-mistake-in-Matrix-example-to-relect-only-X-a.patch (1.78 KB, patch)
2017-06-17 00:04 UTC, Philippe Coval
Details | Splinter Review

Description Philippe Coval 2017-06-17 00:00:19 UTC
Subject: [PATCH] doc: Fix mistake in Matrix example to relect only X along Y
 axis

On some devices, X coordidate is not working well, as if it was swapped,
(click on right, appear on left and vice versa).

To sort this issue, coordidates should be reflected on Y axis:
- new X prosition is changed (width is substracted by X position)
- Y is unchanged (the mistake was here, it was set to X)

In landscape (or portrait) mode:

                [ x ]
                [ y ]
                [ 1 ]
              *
  [ -1 0 1  ]   [ x' ] = -x + 0*y + 1*width
  [  0 1 0  ]   [ y' ] = 0*x + 1*y + 0*height
  [  0 0 1  ]   [ 1  ]

This was verified using this touch screen.

  E: ID_VENDOR=eGalax_Inc.
  E: ID_VENDOR_ENC=eGalax\x20Inc.
  E: ID_VENDOR_ID=0eef

Origin: https://github.com/TizenTeam/libinput/tree/sandbox/pcoval/on/master/review
Comment 1 Philippe Coval 2017-06-17 00:04:28 UTC
Created attachment 132013 [details] [review]
0001-doc-Fix-mistake-in-Matrix-example-to-relect-only-X-a.patch

https://github.com/TizenTeam/libinput/commit/048cad467afe535d15de50ddc7ad23ded8888716.patch
Comment 2 Peter Hutterer 2017-06-18 23:36:24 UTC
oops, yep, definitely a mistake here, thanks. But master on that branch is 762a2 atm, as opposed to 048cad. Which one is the one to use?
Comment 3 Peter Hutterer 2017-06-20 06:45:56 UTC
Pushed the 762a2 from the github repo as 4cf9f8bee19104d60031dd040f5758a10ed805b5, thanks
Comment 4 Philippe Coval 2017-06-20 14:41:59 UTC
Thanks, for the record:

https://cgit.freedesktop.org/wayland/libinput/commit/?id=4cf9f8bee19104d60031dd040f5758a10ed805b5


On device is known as CARTFT's CVL1010:,  used this rule:

LIBINPUT_CALIBRATION_MATRIX="-1 0 1 0 1 0"
usbv="0eef"
usbd="0001"
file="/etc/udev/rules.d/99-${usbv}-${usbd}.rules"

cat<<EOF>"$file"
ACTION=="add|change", KERNEL=="event[0-9]*", \
ENV{ID_VENDOR_ID}=="${usbv}", ENV{ID_MODEL_ID}=="${usbd}", \
ENV{ID_INPUT_TOUCHSCREEN}="1", ENV{ID_INPUT_TABLET}="0", ENV{ID_INPUT_MOUSE}="0",\
ENV{LIBINPUT_CALIBRATION_MATRIX}="${LIBINPUT_CALIBRATION_MATRIX}"
EOF



http://www.cartft.com/en/catalog/il/1589

https://www.slideshare.net/SamsungOSG/toward-ocf-automotive-profile/8#iotivity-agl-demo-platform


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.