From 165fe6ddfb3be22111e72eedd15e8fd67b45ab5b Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 16 Dec 2013 13:26:42 +1100 Subject: [PATCH] lock: don't stop sounds unless key is pressed. i.e. ignore just screen tap. Not sure this is exactly the right solution yet. --- utils/lock.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/lock.py b/utils/lock.py index c4ab396..e22368a 100755 --- a/utils/lock.py +++ b/utils/lock.py @@ -354,7 +354,9 @@ def wake_all(down_cnt, moment, typ, code, value): return if suspended: return - alert.stopall() + if type == 1 and code != 330: + # EV_KEY but not BTN_TOUCH + alert.stopall() display.on() if down_cnt == 0: release_all() @@ -368,7 +370,7 @@ def wake_dim(down_cnt, moment, typ, code, value): global state, suspended if suspended: return - if typ == 0: + if typ != 1: # EV_KEY return #print "wake_dim" if state == "dim" or state == "full": -- 2.39.5