Merge branch 'master-new' of https://github.com/sunnypilot/panda into master-new

This commit is contained in:
infiniteCable2
2025-06-03 19:17:37 +02:00
12 changed files with 51 additions and 14 deletions

View File

@@ -142,7 +142,7 @@ class Panda:
HW_TYPE_UNO: 5100,
HW_TYPE_DOS: 6500,
HW_TYPE_TRES: 6600,
HW_TYPE_CUATRO: 6600,
HW_TYPE_CUATRO: 12500,
}
HARNESS_STATUS_NC = 0

View File

@@ -30,6 +30,8 @@ CANFD_FDF = 0x04 # mark CAN FD for dual use of struct canfd_frame
# https://github.com/torvalds/linux/blob/47ac09b91befbb6a235ab620c32af719f8208399/include/uapi/asm-generic/socket.h#L61
SO_RXQ_OVFL = 40
import typing
@typing.no_type_check # mypy struggles with macOS here...
def create_socketcan(interface:str, recv_buffer_size:int, fd:bool) -> socket.socket:
# settings mostly from https://github.com/linux-can/can-utils/blob/master/candump.c
socketcan = socket.socket(socket.AF_CAN, socket.SOCK_RAW, socket.CAN_RAW)