mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
CEM
This commit is contained in:
@@ -163,16 +163,16 @@ frogpilot_default_params: list[tuple[str, str | bytes, int, str]] = [
|
||||
("CECurvesLead", "0", 1, "0"),
|
||||
("CELead", "0", 1, "0"),
|
||||
("CEModelStopTime", str(PLANNER_TIME - 2), 2, "0"),
|
||||
("CENavigation", "1", 2, "0"),
|
||||
("CENavigation", "0", 2, "0"),
|
||||
("CENavigationIntersections", "1", 2, "0"),
|
||||
("CENavigationLead", "1", 2, "0"),
|
||||
("CENavigationTurns", "1", 2, "0"),
|
||||
("CESignalSpeed", "55", 2, "0"),
|
||||
("CESignalLaneDetection", "1", 2, "0"),
|
||||
("CESlowerLead", "0", 1, "0"),
|
||||
("CESlowerLead", "1", 1, "0"),
|
||||
("CESpeed", "0", 1, "0"),
|
||||
("CESpeedLead", "0", 1, "0"),
|
||||
("CEStoppedLead", "0", 1, "0"),
|
||||
("CEStoppedLead", "1", 1, "0"),
|
||||
("ClusterOffset", "1.015", 2, "1.015"),
|
||||
("Compass", "0", 1, "0"),
|
||||
("ConditionalExperimental", "1", 1, "0"),
|
||||
|
||||
@@ -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