mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 16:33:57 +08:00
Custom Interactive Timeout reimpl
This commit is contained in:
@@ -99,6 +99,8 @@ class UIStateSP:
|
||||
self.onroad_brightness = self.params.get("OnroadScreenOffBrightness", return_default=True)
|
||||
self.onroad_brightness_timer_param = self.params.get("OnroadScreenOffTimer", return_default=True)
|
||||
|
||||
self.interactive_timeout = self.params.get("InteractivityTimeout", return_default=True)
|
||||
|
||||
|
||||
class DeviceSP:
|
||||
def __init__(self):
|
||||
|
||||
@@ -222,6 +222,9 @@ class Device(DeviceSP):
|
||||
if self._override_interactive_timeout is not None:
|
||||
return self._override_interactive_timeout
|
||||
|
||||
if gui_app.sunnypilot_ui() and ui_state.interactive_timeout != 0:
|
||||
return ui_state.interactive_timeout
|
||||
|
||||
ignition_timeout = 10 if gui_app.big_ui() else 5
|
||||
return ignition_timeout if ui_state.ignition else 30
|
||||
|
||||
|
||||
Reference in New Issue
Block a user