From a3e6ea1c89cea5cf26a837cbdedf959287bc3b3b Mon Sep 17 00:00:00 2001 From: seo Date: Thu, 30 Jul 2026 19:21:14 +0900 Subject: [PATCH] =?UTF-8?q?=ED=84=B0=EC=B9=98=20=ED=8C=A8=EB=84=90=20PC=20?= =?UTF-8?q?=EB=8C=80=EA=B8=B0=20=EC=A0=90=EB=A9=B8=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- touch_panel/panel.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/touch_panel/panel.py b/touch_panel/panel.py index e07b41b..43c0bb5 100755 --- a/touch_panel/panel.py +++ b/touch_panel/panel.py @@ -244,6 +244,7 @@ class PcWakeButton(StatusTile): self.last_wake_at = 0.0 self.wait_until = 0.0 self.error_until = 0.0 + self.wait_phase = False self.blink_timer = QTimer(self) self.blink_timer.timeout.connect(self.tick_waiting) self.blink_timer.start(250) @@ -255,19 +256,25 @@ class PcWakeButton(StatusTile): self.error_dot.set_steady(now < self.error_until) if online: self.wait_until = 0.0 + self.wait_phase = False + self.write_dot.set_steady(False) self.detail.setText("켜짐") elif now < self.wait_until: remaining = int(self.wait_until - now) self.detail.setText(f"대기 {remaining}s") else: + self.write_dot.set_steady(False) self.detail.setText("꺼짐") def tick_waiting(self): now = time.monotonic() if not self.online and now < self.wait_until: - self.write_dot.blink() + self.wait_phase = not self.wait_phase + self.write_dot.set_steady(self.wait_phase) if not self.online and self.wait_until > 0 and now >= self.wait_until: self.wait_until = 0.0 + self.wait_phase = False + self.write_dot.set_steady(False) self.error_until = now + 60 self.error_dot.set_steady(True) self.detail.setText("실패") @@ -277,11 +284,12 @@ class PcWakeButton(StatusTile): def mousePressEvent(self, event): if event.button() == Qt.LeftButton: - self.write_dot.blink() now = time.monotonic() if not self.online and now >= self.wait_until: self.last_wake_at = now self.wait_until = now + 60 + self.wait_phase = True + self.write_dot.set_steady(True) self.error_until = 0.0 self.error_dot.set_steady(False) self.detail.setText("깨우는 중") @@ -292,7 +300,6 @@ class PcWakeButton(StatusTile): super().mousePressEvent(event) def tick(self): - self.write_dot.tick() self.error_dot.tick()