Skip to content

Instantly share code, notes, and snippets.

@paresy
Last active April 13, 2020 09:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paresy/5b32edb60039a66bce6aaeadbb6513a7 to your computer and use it in GitHub Desktop.
Save paresy/5b32edb60039a66bce6aaeadbb6513a7 to your computer and use it in GitHub Desktop.
Patch elographics for our elotouch screen
*** Enable src deps...
sudo nano /etc/apt/sources.list
sudo apt update
*** Install package deps
sudo apt build-dep xserver-xorg-input-elographics
*** Download package source (without root!)
apt source xserver-xorg-input-elographics
*** Apply patch inside xserver-xorg-input-elographics-1.4.1 folder
patch -p1 < xxx.patch
*** Rebuild package inside xserver-xorg-input-elographics-1.4.1 folder
dpkg-buildpackage -us -uc
*** Install our custom build package
sudo apt install ./xserver-xorg-input-elographics_1.4.1-1_armhf.deb
*************************************
--- xserver-xorg-input-elographics-1.4.1.orig/src/xf86Elo.c
+++ xserver-xorg-input-elographics-1.4.1/src/xf86Elo.c
@@ -358,6 +358,7 @@
*/
cur_x = WORD_ASSEMBLY(priv->packet_buf[3], priv->packet_buf[4]);
cur_y = WORD_ASSEMBLY(priv->packet_buf[5], priv->packet_buf[6]);
+ cur_y = (priv->max_y+priv->min_y) - cur_y;
state = priv->packet_buf[2] & 0x07;
/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment