|
|
@ -25,8 +25,6 @@ from selfdrive.version import get_git_branch, terms_version, training_version |
|
|
|
|
|
|
|
|
|
|
|
FW_SIGNATURE = get_expected_signature() |
|
|
|
FW_SIGNATURE = get_expected_signature() |
|
|
|
|
|
|
|
|
|
|
|
DISABLE_LTE_ONROAD = os.path.exists("/persist/disable_lte_onroad") or TICI |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ThermalStatus = log.DeviceState.ThermalStatus |
|
|
|
ThermalStatus = log.DeviceState.ThermalStatus |
|
|
|
NetworkType = log.DeviceState.NetworkType |
|
|
|
NetworkType = log.DeviceState.NetworkType |
|
|
|
NetworkStrength = log.DeviceState.NetworkStrength |
|
|
|
NetworkStrength = log.DeviceState.NetworkStrength |
|
|
@ -348,12 +346,14 @@ def thermald_thread(): |
|
|
|
|
|
|
|
|
|
|
|
# Handle offroad/onroad transition |
|
|
|
# Handle offroad/onroad transition |
|
|
|
should_start = all(startup_conditions.values()) |
|
|
|
should_start = all(startup_conditions.values()) |
|
|
|
if should_start: |
|
|
|
if should_start != should_start_prev or (count == 0): |
|
|
|
if not should_start_prev: |
|
|
|
params.put_bool("IsOffroad", not should_start) |
|
|
|
params.delete("IsOffroad") |
|
|
|
HARDWARE.set_power_save(not should_start) |
|
|
|
if TICI and DISABLE_LTE_ONROAD: |
|
|
|
if TICI: |
|
|
|
os.system("sudo systemctl stop --no-block lte") |
|
|
|
fxn = "stop" if should_start else "start" |
|
|
|
|
|
|
|
os.system(f"sudo systemctl {fxn} --no-block lte") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if should_start: |
|
|
|
off_ts = None |
|
|
|
off_ts = None |
|
|
|
if started_ts is None: |
|
|
|
if started_ts is None: |
|
|
|
started_ts = sec_since_boot() |
|
|
|
started_ts = sec_since_boot() |
|
|
@ -362,11 +362,6 @@ def thermald_thread(): |
|
|
|
if startup_conditions["ignition"] and (startup_conditions != startup_conditions_prev): |
|
|
|
if startup_conditions["ignition"] and (startup_conditions != startup_conditions_prev): |
|
|
|
cloudlog.event("Startup blocked", startup_conditions=startup_conditions) |
|
|
|
cloudlog.event("Startup blocked", startup_conditions=startup_conditions) |
|
|
|
|
|
|
|
|
|
|
|
if should_start_prev or (count == 0): |
|
|
|
|
|
|
|
params.put_bool("IsOffroad", True) |
|
|
|
|
|
|
|
if TICI and DISABLE_LTE_ONROAD: |
|
|
|
|
|
|
|
os.system("sudo systemctl start --no-block lte") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
started_ts = None |
|
|
|
started_ts = None |
|
|
|
if off_ts is None: |
|
|
|
if off_ts is None: |
|
|
|
off_ts = sec_since_boot() |
|
|
|
off_ts = sec_since_boot() |
|
|
|