bugfix: on_off_road btn

This commit is contained in:
Rick Lan
2026-05-27 21:21:13 +08:00
parent 5f2c3183d4
commit d9148548fc
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -131,4 +131,5 @@ inline static std::unordered_map<std::string, ParamKeyAttributes> keys = {
{"Version", {PERSISTENT, STRING}},
{"dp_dev_last_log", {CLEAR_ON_ONROAD_TRANSITION, STRING}},
{"dp_dev_reset_conf", {CLEAR_ON_MANAGER_START, BOOL, "0"}},
{"dp_dev_go_off_road", {CLEAR_ON_MANAGER_START, BOOL, "0"}},
};
+2 -2
View File
@@ -280,5 +280,5 @@ class DeviceLayout(Widget):
self._dp_on_off_road_btn.action_item.set_text(tr("Go Onroad") if not val else tr("Go Offroad"))
dialog = ConfirmDialog(tr("Are you sure you want to switch?"), tr("CONFIRM"))
gui_app.set_modal_overlay(dialog, callback=on_off_road)
dialog = ConfirmDialog(tr("Are you sure you want to switch?"), tr("CONFIRM"), callback=on_off_road)
gui_app.push_widget(dialog)