Device: Retain QuickBoot state after op switch (#1333)

Device: Retain QuickBoot state after SSH Update

Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
This commit is contained in:
Nayan
2026-02-09 00:38:39 -05:00
committed by GitHub
parent 981494a354
commit 1f778c8c23

View File

@@ -20,6 +20,7 @@ from openpilot.system.athena.registration import register, UNREGISTERED_DONGLE_I
from openpilot.common.swaglog import cloudlog, add_file_handler
from openpilot.system.version import get_build_metadata
from openpilot.system.hardware.hw import Paths
from openpilot.system.hardware import PC
def manager_init() -> None:
@@ -39,6 +40,12 @@ def manager_init() -> None:
if params.get("DeviceBootMode") == 1: # start in Always Offroad mode
params.put_bool("OffroadMode", True)
# quick boot
if params.get_bool("QuickBootToggle") and not PC:
prebuilt_path = "/data/openpilot/prebuilt"
if not os.path.exists(prebuilt_path):
open(prebuilt_path, 'x').close()
if params.get_bool("RecordFrontLock"):
params.put_bool("RecordFront", True)