diff --git a/system-status.py b/system-status.py index 6446f0f..193b5d8 100644 --- a/system-status.py +++ b/system-status.py @@ -21,30 +21,20 @@ class SystemStatus: self.hat.show() def exit(self): - self.hat.set_all(0, 0, 50) + self.hat.set_all(50, 0, 0) self.hat.show() - sleep(0.25) - self.hat.set_all(0, 0, 0) - self.hat.show() - sleep(0.25) - self.hat.set_all(0, 0, 50) - self.hat.show() - sleep(0.25) + sleep(0.50) self.hat.set_all(0, 0, 0) self.hat.show() def terminate(self): - self.hat.set_all(50, 0, 0) - self.hat.show() - sleep(0.25) - self.hat.set_all(0, 0, 0) - self.hat.show() - sleep(0.25) - self.hat.set_all(50, 0, 0) - self.hat.show() - sleep(0.25) - self.hat.set_all(0, 0, 0) - self.hat.show() + for _ in range(3): + self.hat.set_all(50, 0, 0) + self.hat.show() + sleep(0.25) + self.hat.set_all(0, 0, 0) + self.hat.show() + sleep(0.25) def cleanExit(systemStatus, button): @@ -58,7 +48,6 @@ def cleanExit(systemStatus, button): def poweroff(systemStatus, button): def terminate(): - button.close() systemStatus.terminate() check_call(['sudo', 'poweroff'])