diff --git a/__init__.py b/__init__.py index 12fbe3a7..a852d49e 100644 --- a/__init__.py +++ b/__init__.py @@ -2,7 +2,7 @@ from .python.constants import McuType, BASEDIR, FW_PATH, USBPACKET_MAX_SIZE # n from .python.spi import PandaSpiException, PandaProtocolMismatch, STBootloaderSPIHandle # noqa: F401 from .python.serial import PandaSerial # noqa: F401 from .python.utils import logger # noqa: F401 -from .python import (Panda, PandaDFU, # noqa: F401 +from .python import (Panda, PandaDFU, PandaDEPRECATED, # noqa: F401 pack_can_buffer, unpack_can_buffer, calculate_checksum, DLC_TO_LEN, LEN_TO_DLC, CANPACKET_HEAD_SIZE) diff --git a/python/__init__.py b/python/__init__.py index 70d68d5b..f15f2101 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -101,6 +101,20 @@ ensure_can_health_packet_version = partial(ensure_version, "CAN health", "CAN_HE ensure_health_packet_version = partial(ensure_version, "health", "HEALTH_PACKET_VERSION", "health_version") +class PandaDEPRECATED: + # deprecated devices + HW_TYPE_WHITE_PANDA = b'\x01' + HW_TYPE_GREY_PANDA = b'\x02' + HW_TYPE_BLACK_PANDA = b'\x03' + HW_TYPE_PEDAL = b'\x04' + HW_TYPE_UNO = b'\x05' + HW_TYPE_RED_PANDA_V2 = b'\x08' + + F4_DEVICES = [HW_TYPE_WHITE_PANDA, HW_TYPE_GREY_PANDA, HW_TYPE_BLACK_PANDA, HW_TYPE_UNO] + H7_DEVICES = [HW_TYPE_RED_PANDA_V2, ] + INTERNAL_DEVICES = (HW_TYPE_UNO, ) + DEVICES = F4_DEVICES + H7_DEVICES + list(INTERNAL_DEVICES) + class Panda: @@ -125,10 +139,10 @@ class Panda: HEALTH_STRUCT = struct.Struct("