From deeb4840dc5129d4a2cc9ef130b4462799eaa167 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Wed, 12 Feb 2025 01:23:05 -0600 Subject: [PATCH] Fix opendbc hitl test (#2147) needs opendbc --- Jenkinsfile | 1 + python/__init__.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3e6b888e..64429b77 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,6 +33,7 @@ export GIT_BRANCH=${env.GIT_BRANCH} export GIT_COMMIT=${env.GIT_COMMIT} export PYTHONPATH=${env.TEST_DIR}/../ export PYTHONWARNINGS=error +ln -sf /data/openpilot/opendbc_repo/opendbc /data/opendbc cd ${env.TEST_DIR} || true ${cmd} diff --git a/python/__init__.py b/python/__init__.py index e548704c..6c6d166b 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -9,6 +9,8 @@ import binascii from functools import wraps, partial from itertools import accumulate +from opendbc.safety import Safety + from .base import BaseHandle from .constants import FW_PATH, McuType from .dfu import PandaDFU @@ -712,7 +714,7 @@ class Panda: def set_power_save(self, power_save_enabled=0): self._handle.controlWrite(Panda.REQUEST_OUT, 0xe7, int(power_save_enabled), 0, b'') - def set_safety_mode(self, mode=0, param=0): # Safety.SAFETY_SILENT + def set_safety_mode(self, mode=Safety.SAFETY_SILENT, param=0): self._handle.controlWrite(Panda.REQUEST_OUT, 0xdc, mode, param, b'') def set_obd(self, obd):