diff --git a/system/manager/manager.py b/system/manager/manager.py index 24e557786..885590471 100755 --- a/system/manager/manager.py +++ b/system/manager/manager.py @@ -136,6 +136,34 @@ def manager_init() -> None: with open(cem_migration_flag_file, "w") as f: f.write("migrated") + # One-time migration for NNFF to off + nnff_migration_flag_file = "/data/media/0/frogpilot_nnff_migrated.flag" + if not os.path.exists(nnff_migration_flag_file): + if params.get_bool("NNFF"): + params.put_bool("NNFF", False) + with open(nnff_migration_flag_file, "w") as f: + f.write("migrated") + + # One-time migration for lateral tuning/auto-tune preferences + lateral_tuning_migration_flag_file = "/data/media/0/frogpilot_lateral_tuning_migrated.flag" + if not os.path.exists(lateral_tuning_migration_flag_file): + if not params.get_bool("AdvancedLateralTune"): + params.put_bool("AdvancedLateralTune", True) + if params.get_bool("ForceAutoTune"): + params.put_bool("ForceAutoTune", False) + if not params.get_bool("ForceAutoTuneOff"): + params.put_bool("ForceAutoTuneOff", True) + with open(lateral_tuning_migration_flag_file, "w") as f: + f.write("migrated") + + # One-time migration for MaxDesiredAcceleration to 4 + max_desired_acceleration_migration_flag_file = "/data/media/0/frogpilot_max_desired_acceleration_migrated.flag" + if not os.path.exists(max_desired_acceleration_migration_flag_file): + if params.get_float("MaxDesiredAcceleration") != 4.0: + params.put_float("MaxDesiredAcceleration", 4.0) + with open(max_desired_acceleration_migration_flag_file, "w") as f: + f.write("migrated") + # set dongle id reg_res = register(show_spinner=True) if reg_res: