aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhesicong <derekhe@april1985.com>2015-07-05 16:54:41 +0800
committerhesicong <derekhe@april1985.com>2015-07-05 16:54:41 +0800
commit528c9768ac2c893371ea0e3eb9c17124aeb5d6ea (patch)
tree28222ec019138042f44ca13bc9b34ccedc634a8c
parentbae7ce9ee77ebe5a084648d4b09c1e2401796b06 (diff)
parentf8bc66282afa752a91aea6fc87dd4f0a323986a5 (diff)
downloadwaveshare-7inch-touchscreen-driver-528c9768ac2c893371ea0e3eb9c17124aeb5d6ea.tar.xz
waveshare-7inch-touchscreen-driver-528c9768ac2c893371ea0e3eb9c17124aeb5d6ea.zip
Merge pull request #1 from icebob/master
100% cpu usage on one core of CPU
Diffstat (limited to '')
-rw-r--r--touch.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/touch.py b/touch.py
index f32a28c..223c3da 100644
--- a/touch.py
+++ b/touch.py
@@ -29,6 +29,7 @@ def read_and_emulate_mouse(deviceFound):
b = f.read(25)
(tag, btnLeft, x, y) = struct.unpack_from('>c?HH', b)
print(btnLeft, x, y)
+ time.sleep(0.01)
if btnLeft:
device.emit(uinput.ABS_X, x, True)