aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIcebob <mereg.norbert@gmail.com>2015-07-04 23:11:04 +0200
committerIcebob <mereg.norbert@gmail.com>2015-07-04 23:11:04 +0200
commitf8bc66282afa752a91aea6fc87dd4f0a323986a5 (patch)
tree28222ec019138042f44ca13bc9b34ccedc634a8c
parentbae7ce9ee77ebe5a084648d4b09c1e2401796b06 (diff)
downloadwaveshare-7inch-touchscreen-driver-f8bc66282afa752a91aea6fc87dd4f0a323986a5.tar.xz
waveshare-7inch-touchscreen-driver-f8bc66282afa752a91aea6fc87dd4f0a323986a5.zip
Added sleep in while true
-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)