always reset if not ready

This commit is contained in:
Jason Wen
2024-09-14 20:34:55 -04:00
parent 6e9a2eefeb
commit 3798118a76

View File

@@ -13,6 +13,9 @@ class ButtonStateBase(ABC):
self.button_count = 0
def __call__(self, controller) -> int | None:
if not controller.is_ready:
controller.button_state = ButtonControlState.inactive
return self.handle(controller)
@abstractmethod