|
|
@ -1,5 +1,4 @@ |
|
|
|
#!/usr/bin/env python3 |
|
|
|
#!/usr/bin/env python3 |
|
|
|
import datetime |
|
|
|
|
|
|
|
import os |
|
|
|
import os |
|
|
|
import json |
|
|
|
import json |
|
|
|
import queue |
|
|
|
import queue |
|
|
@ -15,7 +14,6 @@ import cereal.messaging as messaging |
|
|
|
from cereal import log |
|
|
|
from cereal import log |
|
|
|
from cereal.services import SERVICE_LIST |
|
|
|
from cereal.services import SERVICE_LIST |
|
|
|
from openpilot.common.dict_helpers import strip_deprecated_keys |
|
|
|
from openpilot.common.dict_helpers import strip_deprecated_keys |
|
|
|
from openpilot.common.time import MIN_DATE |
|
|
|
|
|
|
|
from openpilot.common.filter_simple import FirstOrderFilter |
|
|
|
from openpilot.common.filter_simple import FirstOrderFilter |
|
|
|
from openpilot.common.params import Params |
|
|
|
from openpilot.common.params import Params |
|
|
|
from openpilot.common.realtime import DT_TRML |
|
|
|
from openpilot.common.realtime import DT_TRML |
|
|
@ -293,11 +291,6 @@ def thermald_thread(end_event, hw_queue) -> None: |
|
|
|
|
|
|
|
|
|
|
|
# **** starting logic **** |
|
|
|
# **** starting logic **** |
|
|
|
|
|
|
|
|
|
|
|
# Ensure date/time are valid |
|
|
|
|
|
|
|
now = datetime.datetime.utcnow() |
|
|
|
|
|
|
|
startup_conditions["time_valid"] = now > MIN_DATE |
|
|
|
|
|
|
|
set_offroad_alert_if_changed("Offroad_InvalidTime", (not startup_conditions["time_valid"]) and peripheral_panda_present) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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") |
|
|
|
startup_conditions["not_uninstalling"] = not params.get_bool("DoUninstall") |
|
|
|
startup_conditions["not_uninstalling"] = not params.get_bool("DoUninstall") |
|
|
|
startup_conditions["accepted_terms"] = params.get("HasAcceptedTerms") == terms_version |
|
|
|
startup_conditions["accepted_terms"] = params.get("HasAcceptedTerms") == terms_version |
|
|
|