Merge branch 'master-ref-sync-20250228' into sync-20250228

# Conflicts:
#	.github/workflows/test.yaml
#	Dockerfile
#	board/safety.h
#	board/safety/safety_chrysler.h
#	board/safety/safety_ford.h
#	board/safety/safety_gm.h
#	board/safety/safety_honda.h
#	board/safety/safety_hyundai.h
#	board/safety/safety_hyundai_canfd.h
#	board/safety/safety_hyundai_common.h
#	board/safety/safety_mazda.h
#	board/safety/safety_nissan.h
#	board/safety/safety_subaru.h
#	board/safety/safety_subaru_preglobal.h
#	board/safety/safety_toyota.h
#	tests/libpanda/safety_helpers.h
#	tests/libpanda/safety_helpers.py
#	tests/safety/common.py
#	tests/safety/hyundai_common.py
#	tests/safety/mutation.sh
#	tests/safety/test_chrysler.py
#	tests/safety/test_ford.py
#	tests/safety/test_honda.py
#	tests/safety/test_hyundai.py
#	tests/safety/test_hyundai_canfd.py
#	tests/safety/test_nissan.py
#	tests/safety/test_subaru.py
#	tests/safety/test_toyota.py
#	tests/safety_replay/replay_drive.py
This commit is contained in:
DevTekVE
2025-02-28 17:56:53 +01:00
91 changed files with 158 additions and 12160 deletions

View File

@@ -9,10 +9,11 @@ import binascii
from functools import wraps, partial
from itertools import accumulate
from opendbc.car.structs import CarParams
from .base import BaseHandle
from .constants import FW_PATH, McuType
from .dfu import PandaDFU
from .isotp import isotp_send, isotp_recv
from .spi import PandaSpiHandle, PandaSpiException, PandaProtocolMismatch
from .usb import PandaUsbHandle
from .utils import logger
@@ -712,7 +713,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=CarParams.SafetyModel.silent, param=0):
self._handle.controlWrite(Panda.REQUEST_OUT, 0xdc, mode, param, b'')
def set_obd(self, obd):
@@ -793,14 +794,6 @@ class Panda:
"""
self._handle.controlWrite(Panda.REQUEST_OUT, 0xf1, bus, 0, b'')
# ******************* isotp *******************
def isotp_send(self, addr, dat, bus, recvaddr=None, subaddr=None):
return isotp_send(self, dat, addr, bus, recvaddr, subaddr)
def isotp_recv(self, addr, bus=0, sendaddr=None, subaddr=None):
return isotp_recv(self, addr, bus, sendaddr, subaddr)
# ******************* serial *******************
def serial_read(self, port_number):