mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 16:23:46 +08:00
CEM
This commit is contained in:
@@ -110,6 +110,22 @@ def manager_init() -> None:
|
||||
with open(nnfflite_migration_flag_file, "w") as f:
|
||||
f.write("migrated")
|
||||
|
||||
# One-time migration for CEM settings
|
||||
cem_migration_flag_file = "/data/media/0/frogpilot_cem_migrated.flag"
|
||||
if not os.path.exists(cem_migration_flag_file):
|
||||
# Enable slower and stopped leads by default
|
||||
if not params.get_bool("CESlowerLead"):
|
||||
params.put_bool("CESlowerLead", True)
|
||||
if not params.get_bool("CEStoppedLead"):
|
||||
params.put_bool("CEStoppedLead", True)
|
||||
# Disable navigation and curves by default
|
||||
if params.get_bool("CENavigation"):
|
||||
params.put_bool("CENavigation", False)
|
||||
if params.get_bool("CECurves"):
|
||||
params.put_bool("CECurves", False)
|
||||
with open(cem_migration_flag_file, "w") as f:
|
||||
f.write("migrated")
|
||||
|
||||
# set dongle id
|
||||
reg_res = register(show_spinner=True)
|
||||
if reg_res:
|
||||
|
||||
Reference in New Issue
Block a user