mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-09-30 19:43:41 +08:00
ui: offroad alerts params thread (#38043)
* offroad alerts in thread * stashh * better * revert * revert * revert * clean up * rename * hack
This commit is contained in:
@@ -354,7 +354,10 @@ def build_mici_script(pm: PubMaster, main_layout, script: Script) -> None:
|
||||
def setup_offroad_alerts_and_refresh() -> None:
|
||||
"""Setup function to trigger offroad alerts and force a refresh on the alerts layout."""
|
||||
setup_offroad_alerts()
|
||||
main_layout._alerts_layout.refresh()
|
||||
params = Params()
|
||||
main_layout._alerts_layout._pending_params = ({"UpdaterNewDescription": params.get("UpdaterNewDescription")} |
|
||||
{alert_data.key: params.get(alert_data.key) for alert_data in main_layout._alerts_layout.sorted_alerts})
|
||||
main_layout._alerts_layout._refresh()
|
||||
|
||||
swipe_right(width, wait_after=WAIT_SHORT) # open alerts
|
||||
script.setup(setup_offroad_alerts_and_refresh) # show alerts
|
||||
|
||||
Reference in New Issue
Block a user