Controls - Device Management - Offline Mode

Allow the device to be offline indefinitely.
This commit is contained in:
FrogAi
2024-06-07 07:49:37 -07:00
parent 99f6a1ebd4
commit fcee2a4f9c
4 changed files with 16 additions and 1 deletions
+1 -1
View File
@@ -298,7 +298,7 @@ def hardware_thread(end_event, hw_queue, frogpilot_toggles) -> None:
# **** starting logic ****
startup_conditions["up_to_date"] = params.get("Offroad_ConnectivityNeeded") is None or params.get_bool("DisableUpdates") or params.get_bool("SnoozeUpdate")
startup_conditions["up_to_date"] = params.get("Offroad_ConnectivityNeeded") is None or params.get_bool("DisableUpdates") or params.get_bool("SnoozeUpdate") or frogpilot_toggles.offline_mode
startup_conditions["not_uninstalling"] = not params.get_bool("DoUninstall")
startup_conditions["accepted_terms"] = params.get("HasAcceptedTerms") == terms_version
+2
View File
@@ -327,6 +327,8 @@ class Updater:
set_offroad_alert(alert, False)
now = datetime.datetime.utcnow()
if FrogPilotVariables.toggles.offline_mode:
last_update = now
dt = now - last_update
build_metadata = get_build_metadata()
if failed_count > 15 and exception is not None and self.has_internet: