Merge branch 'master' of ssh://github.com/commaai/panda into rbst

This commit is contained in:
Adeeb Shihadeh
2025-09-23 18:32:22 -07:00
23 changed files with 85 additions and 178 deletions

View File

@@ -23,7 +23,7 @@ __version__ = '0.0.10'
CANPACKET_HEAD_SIZE = 0x6
DLC_TO_LEN = [0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 20, 24, 32, 48, 64]
LEN_TO_DLC = {length: dlc for (dlc, length) in enumerate(DLC_TO_LEN)}
PANDA_BUS_CNT = 3
PANDA_CAN_CNT = 3
def calculate_checksum(data):
@@ -131,7 +131,7 @@ class Panda:
MAX_FAN_RPMs = {
HW_TYPE_TRES: 6600,
HW_TYPE_CUATRO: 12500,
HW_TYPE_CUATRO: 5000,
}
HARNESS_STATUS_NC = 0
@@ -225,11 +225,11 @@ class Panda:
self.can_reset_communications()
# disable automatic CAN-FD switching
for bus in range(PANDA_BUS_CNT):
for bus in range(PANDA_CAN_CNT):
self.set_canfd_auto(bus, False)
# set CAN speed
for bus in range(PANDA_BUS_CNT):
for bus in range(PANDA_CAN_CNT):
self.set_can_speed_kbps(bus, self._can_speed_kbps)
@property