From 2ab19dbd4cdbf99d07fe6a7abb4b7a69f6bd7867 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Fri, 17 Oct 2025 17:38:57 -0500 Subject: [PATCH] CEM --- frogpilot/common/frogpilot_variables.py | 6 +++--- system/manager/manager.py | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/frogpilot/common/frogpilot_variables.py b/frogpilot/common/frogpilot_variables.py index 6bd4f65c4..360a662ef 100644 --- a/frogpilot/common/frogpilot_variables.py +++ b/frogpilot/common/frogpilot_variables.py @@ -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"), diff --git a/system/manager/manager.py b/system/manager/manager.py index f2979c52f..70c52beb7 100755 --- a/system/manager/manager.py +++ b/system/manager/manager.py @@ -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: