mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-10-01 03:53:45 +08:00
always reset if not ready
This commit is contained in:
@@ -13,6 +13,9 @@ class ButtonStateBase(ABC):
|
|||||||
self.button_count = 0
|
self.button_count = 0
|
||||||
|
|
||||||
def __call__(self, controller) -> int | None:
|
def __call__(self, controller) -> int | None:
|
||||||
|
if not controller.is_ready:
|
||||||
|
controller.button_state = ButtonControlState.inactive
|
||||||
|
|
||||||
return self.handle(controller)
|
return self.handle(controller)
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user