mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-07-26 20:32:04 +08:00
Refactor automatic updates logic and adjust visibility in settings
This commit is contained in:
@@ -691,7 +691,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 toggle.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 toggle.tuning_level >= level["PauseAOLOnBrake"] else default.get_int("PauseAOLOnBrake")
|
||||
|
||||
toggle.automatic_updates = (params.get_bool("AutomaticUpdates") if toggle.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 toggle.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
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ from openpilot.frogpilot.common.frogpilot_functions import backup_toggles
|
||||
from openpilot.frogpilot.common.frogpilot_utilities import capture_report, flash_panda, is_url_pingable, lock_doors, run_thread_with_lock, update_maps, update_openpilot
|
||||
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.system.frogpilot_stats import send_stats
|
||||
from openpilot.frogpilot.system.frogpilot_tracking import FrogPilotTracking
|
||||
|
||||
ASSET_CHECK_RATE = (1 / DT_MDL)
|
||||
@@ -103,8 +102,8 @@ def frogpilot_thread():
|
||||
if frogpilot_toggles.random_themes:
|
||||
theme_manager.update_active_theme(time_validated, frogpilot_toggles, randomize_theme=True)
|
||||
|
||||
if time_validated:
|
||||
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():
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user