mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-09-30 11:23:44 +08:00
added reset button support
This commit is contained in:
@@ -216,6 +216,7 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"dp_long_personality_btn", PERSISTENT},
|
||||
{"dp_nav_full_screen", PERSISTENT},
|
||||
{"dp_alka", PERSISTENT},
|
||||
{"dp_device_reset_conf", CLEAR_ON_MANAGER_START},
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -174,8 +174,10 @@ def manager_thread() -> None:
|
||||
|
||||
# Exit main loop when uninstall/shutdown/reboot is needed
|
||||
shutdown = False
|
||||
for param in ("DoUninstall", "DoShutdown", "DoReboot"):
|
||||
for param in ("DoUninstall", "DoShutdown", "DoReboot", "dp_device_reset_conf"):
|
||||
if params.get_bool(param):
|
||||
if param == "dp_device_reset_conf":
|
||||
os.system("rm -fr /data/params/d/dp_*")
|
||||
shutdown = True
|
||||
params.put("LastManagerExitReason", f"{param} {datetime.datetime.now()}")
|
||||
cloudlog.warning(f"Shutting down manager - {param} set")
|
||||
|
||||
Reference in New Issue
Block a user