From f8064c4d0b8074108ea00fd3f47b9d43bea38ac6 Mon Sep 17 00:00:00 2001 From: admin <420@shampoo.ooo> Date: Tue, 4 Jan 2022 20:38:47 -0500 Subject: [PATCH] reset idle timeout when serial data causes a light to be pressed --- NS.py | 3 +++ resource/scores | 1 + 2 files changed, 4 insertions(+) diff --git a/NS.py b/NS.py index 1eaea6e..b7ee738 100644 --- a/NS.py +++ b/NS.py @@ -151,6 +151,9 @@ class NS(Game, Animation): def apply_serial(self): for ii, light in enumerate(self.platform.lights): light.pressed = bool(self.serial_data & (2 ** ii)) + # reset idle timer is a light is detected as pressed in serial data + if light.pressed: + self.idle_elapsed = 0 def reset(self, leave_wipe_running=False): self.score_hidden = False diff --git a/resource/scores b/resource/scores index ef7a589..fbef4f3 100644 --- a/resource/scores +++ b/resource/scores @@ -19,3 +19,4 @@ 237842 171298 198296 +152352