diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 7660e5bd3a..a3bec8688a 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -445,6 +445,15 @@ class Controls: self.set_initial_state() self.params.put_bool_nonblocking("ControlsReady", True) + if not all_valid and timed_out: + cloudlog.event( + "controlsd.init_timeout", + canValid=CS.canValid, + invalid=[s for s, valid in self.sm.valid.items() if not valid], + not_alive=[s for s, alive in self.sm.alive.items() if not alive], + not_freq_ok=[s for s, freq_ok in self.sm.freq_ok.items() if not freq_ok], + ) + # Check for CAN timeout if not can_strs: self.can_rcv_timeout_counter += 1 diff --git a/selfdrive/manager/helpers.py b/selfdrive/manager/helpers.py index 797f4ee92e..047d0ac2d6 100644 --- a/selfdrive/manager/helpers.py +++ b/selfdrive/manager/helpers.py @@ -1,9 +1,10 @@ +import errno +import fcntl import os import sys -import fcntl -import errno -import signal +import pathlib import shutil +import signal import subprocess import tempfile import threading @@ -52,7 +53,9 @@ def write_onroad_params(started, params): def save_bootlog(): # copy current params tmp = tempfile.mkdtemp() - shutil.copytree(Params().get_param_path() + "/..", tmp, dirs_exist_ok=True) + params_dirname = pathlib.Path(Params().get_param_path()).name + params_dir = os.path.join(tmp, params_dirname) + shutil.copytree(Params().get_param_path(), params_dir, dirs_exist_ok=True) def fn(tmpdir): env = os.environ.copy() diff --git a/selfdrive/modeld/models/supercombo.onnx b/selfdrive/modeld/models/supercombo.onnx index 1777949cdd..dc93d84135 100644 --- a/selfdrive/modeld/models/supercombo.onnx +++ b/selfdrive/modeld/models/supercombo.onnx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:738ef0a3407e1f918d928dd195dc0e2a326f7610a38184c4801a0f717a8255ea +oid sha256:763821410b35b06b598cacfa5bc3e312610b3f8de2729e0d5954d7571b6794be size 48219112 diff --git a/selfdrive/test/process_replay/model_replay_ref_commit b/selfdrive/test/process_replay/model_replay_ref_commit index 2d886684af..a2f6896307 100644 --- a/selfdrive/test/process_replay/model_replay_ref_commit +++ b/selfdrive/test/process_replay/model_replay_ref_commit @@ -1 +1 @@ -06bdc69a0229bece7b60178c421feda329522585 +fee90bcee1e545c7ec9a39d3c7d4e42cfefb9955 diff --git a/system/sensord/sensors_qcom2.cc b/system/sensord/sensors_qcom2.cc index 36d9b4a13e..9cbc24864d 100644 --- a/system/sensord/sensors_qcom2.cc +++ b/system/sensord/sensors_qcom2.cc @@ -134,7 +134,13 @@ int sensor_loop(I2CBus *i2c_bus_imu) { // increase interrupt quality by pinning interrupt and process to core 1 setpriority(PRIO_PROCESS, 0, -18); util::set_core_affinity({1}); - std::system("sudo su -c 'echo 1 > /proc/irq/336/smp_affinity_list'"); + + // TODO: get the IRQ number from gpiochip + std::string irq_path = "/proc/irq/336/smp_affinity_list"; + if (!util::file_exists(irq_path)) { + irq_path = "/proc/irq/335/smp_affinity_list"; + } + std::system(util::string_format("sudo su -c 'echo 1 > %s'", irq_path.c_str()).c_str()); // thread for reading events via interrupts threads.emplace_back(&interrupt_loop, std::ref(sensors_init));