From cbcc59f781a90e0edb17fcb7512cff06dfa8103c Mon Sep 17 00:00:00 2001 From: MoreTore Date: Tue, 21 Oct 2025 18:46:48 -0500 Subject: [PATCH] Refactor automatic updates logic and adjust visibility in settings --- frogpilot/common/frogpilot_variables.py | 2 +- frogpilot/frogpilot_process.py | 5 ++--- selfdrive/ui/qt/offroad/software_settings.cc | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/frogpilot/common/frogpilot_variables.py b/frogpilot/common/frogpilot_variables.py index c84094b417..92e4260f81 100644 --- a/frogpilot/common/frogpilot_variables.py +++ b/frogpilot/common/frogpilot_variables.py @@ -624,7 +624,7 @@ class FrogPilotVariables: toggle.always_on_lateral_main = toggle.always_on_lateral_set and not toggle.use_lkas_for_aol and (params.get_bool("AlwaysOnLateralMain") if tuning_level >= level["AlwaysOnLateralMain"] else default.get_bool("AlwaysOnLateralMain")) toggle.always_on_lateral_pause_speed = params.get_int("PauseAOLOnBrake") if toggle.always_on_lateral_set and tuning_level >= level["PauseAOLOnBrake"] else default.get_int("PauseAOLOnBrake") - toggle.automatic_updates = (params.get_bool("AutomaticUpdates") if tuning_level >= level["AutomaticUpdates"] and (self.release_branch or self.vetting_branch) else default.get_bool("AutomaticUpdates")) and not BACKUP_PATH.is_file() + toggle.automatic_updates = (params.get_bool("AutomaticUpdates") if tuning_level >= level["AutomaticUpdates"] else default.get_bool("AutomaticUpdates")) and not BACKUP_PATH.is_file() toggle.car_model = params.get("CarModel", encoding="utf-8") or toggle.car_model diff --git a/frogpilot/frogpilot_process.py b/frogpilot/frogpilot_process.py index 98aeebef66..3e74c68167 100644 --- a/frogpilot/frogpilot_process.py +++ b/frogpilot/frogpilot_process.py @@ -17,7 +17,6 @@ from openpilot.frogpilot.common.frogpilot_utilities import flash_panda, is_url_p from openpilot.frogpilot.common.frogpilot_variables import ERROR_LOGS_PATH, FrogPilotVariables, get_frogpilot_toggles, params, params_cache, params_memory from openpilot.frogpilot.controls.frogpilot_planner import FrogPilotPlanner from openpilot.frogpilot.controls.lib.frogpilot_tracking import FrogPilotTracking -from openpilot.frogpilot.system.frogpilot_stats import send_stats ASSET_CHECK_RATE = (1 / DT_MDL) @@ -106,8 +105,8 @@ def frogpilot_thread(): if frogpilot_toggles.random_themes: theme_manager.update_active_theme(time_validated, frogpilot_toggles, randomize_theme=True) - if time_validated and is_url_pingable(os.environ.get("STATS_URL", "")): - send_stats() + # if time_validated and is_url_pingable(os.environ.get("STATS_URL", "")): + # send_stats() elif started and not started_previously: if error_log.is_file(): diff --git a/selfdrive/ui/qt/offroad/software_settings.cc b/selfdrive/ui/qt/offroad/software_settings.cc index ae7986892d..a920e1cc31 100644 --- a/selfdrive/ui/qt/offroad/software_settings.cc +++ b/selfdrive/ui/qt/offroad/software_settings.cc @@ -32,7 +32,6 @@ SoftwarePanel::SoftwarePanel(QWidget* parent) : ListWidget(parent) { // automatic updates toggle ParamControl *automaticUpdatesToggle = new ParamControl("AutomaticUpdates", tr("Automatically Update FrogPilot"), tr("FrogPilot will automatically update itself and it's assets when you're offroad and have an active internet connection."), ""); - automaticUpdatesToggle->setVisible(params.getBool("IsReleaseBranch")); addItem(automaticUpdatesToggle); // download update btn