Offline Mode

Added button and toggle to allow the device to be offline indefinitely.
This commit is contained in:
FrogAi
2024-02-27 16:34:47 -07:00
parent 232c2bd713
commit 55313e6206
7 changed files with 21 additions and 2 deletions

View File

@@ -238,6 +238,7 @@ class Updater:
self._has_internet: bool = False
# FrogPilot variables
self.disable_internet_check = self.params.get_bool("OfflineMode") and self.params.get_bool("FireTheBabysitter")
@property
def has_internet(self) -> bool:
@@ -327,6 +328,8 @@ class Updater:
set_offroad_alert(alert, False)
now = datetime.datetime.utcnow()
if self.disable_internet_check:
last_update = now
dt = now - last_update
if failed_count > 15 and exception is not None and self.has_internet:
if is_tested_branch():