auto updates

This commit is contained in:
firestar5683
2026-03-27 11:13:33 -05:00
parent ca92674263
commit 3fe8671e90
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -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"):
+7 -2
View File
@@ -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(