From 3fe8671e90e26439fc24e5321e6e7b55ce7c0463 Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Fri, 27 Mar 2026 11:13:33 -0500 Subject: [PATCH] auto updates --- frogpilot/common/frogpilot_variables.py | 2 +- system/updated/updated.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/frogpilot/common/frogpilot_variables.py b/frogpilot/common/frogpilot_variables.py index a452e0ff..1b4568fd 100644 --- a/frogpilot/common/frogpilot_variables.py +++ b/frogpilot/common/frogpilot_variables.py @@ -526,7 +526,7 @@ class FrogPilotVariables: toggle.always_on_lateral_main = toggle.always_on_lateral and not prohibited_main_aol and not toggle.always_on_lateral_lkas toggle.always_on_lateral_pause_speed = self.get_value("PauseAOLOnBrake", cast=float, condition=toggle.always_on_lateral) - toggle.automatic_updates = self.get_value("AutomaticUpdates", condition=(self.release_branch or self.vetting_branch or self.frogs_go_moo), default=True) and not BACKUP_PATH.is_file() + toggle.automatic_updates = self.get_value("AutomaticUpdates") and not BACKUP_PATH.is_file() car_model = normalize_legacy_car_model(self.params.get("CarModel")) if car_model != self.params.get("CarModel"): diff --git a/system/updated/updated.py b/system/updated/updated.py index fd9d6d11..1fb9feef 100644 --- a/system/updated/updated.py +++ b/system/updated/updated.py @@ -462,6 +462,8 @@ def main() -> None: # FrogPilot variables frogpilot_toggles = get_frogpilot_toggles() + automatic_updates_enabled = getattr(frogpilot_toggles, "automatic_updates", True) + user_requested_action = wait_helper.user_request != UserRequest.NONE manual_update_requested = params_memory.get_bool("ManualUpdateInitiated") params_memory.remove("ManualUpdateInitiated") @@ -482,7 +484,7 @@ def main() -> None: update_failed_count += 1 - if manual_update_requested or params.get_bool("IsOffroad"): + if manual_update_requested or user_requested_action or (params.get_bool("IsOffroad") and automatic_updates_enabled): # check for update params.put("UpdaterState", "checking...") updater.check_for_update() @@ -499,7 +501,10 @@ def main() -> None: updater.fetch_update() write_time_to_param(params, "UpdaterLastFetchTime") else: - cloudlog.info("skipping fetch, vehicle is onroad") + if not params.get_bool("IsOffroad"): + cloudlog.info("skipping fetch, vehicle is onroad") + else: + cloudlog.info("skipping fetch, automatic updates disabled") update_failed_count = 0 except subprocess.CalledProcessError as e: cloudlog.event(