mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-12 04:05:04 +08:00
always reset if not ready
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user