From: NeilBrown Date: Mon, 16 Dec 2013 02:26:42 +0000 (+1100) Subject: lock: don't stop sounds unless key is pressed. X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=165fe6ddfb3be22111e72eedd15e8fd67b45ab5b;p=plato.git lock: don't stop sounds unless key is pressed. i.e. ignore just screen tap. Not sure this is exactly the right solution yet. --- 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":