Skip to content

Commit a744fa7

Browse files
authored
Move isotp.py, ccp.py and xcp.py to opendbc (commaai#2166)
* Move ccp.py and xcp.py to opendbc * move isotp * more cleanup
1 parent 0924df1 commit a744fa7

File tree

7 files changed

+2
-837
lines changed

7 files changed

+2
-837
lines changed

__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
from .python.constants import McuType, BASEDIR, FW_PATH, USBPACKET_MAX_SIZE # noqa: F401
22
from .python.spi import PandaSpiException, PandaProtocolMismatch, STBootloaderSPIHandle # noqa: F401
33
from .python.serial import PandaSerial # noqa: F401
4-
from .python.canhandle import CanHandle # noqa: F401
54
from .python.utils import logger # noqa: F401
6-
from .python import (Panda, PandaDFU, isotp, # noqa: F401
5+
from .python import (Panda, PandaDFU, # noqa: F401
76
pack_can_buffer, unpack_can_buffer, calculate_checksum,
87
DLC_TO_LEN, LEN_TO_DLC, CANPACKET_HEAD_SIZE)
98

examples/query_vin_and_stats.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from opendbc.car.structs import CarParams
55
from panda import Panda
66
from hexdump import hexdump
7-
from panda.python.isotp import isotp_send, isotp_recv
7+
from opendbc.car.isotp import isotp_send, isotp_recv
88

99
# 0x7e0 = Toyota
1010
# 0x18DB33F1 for Honda?

python/__init__.py

-9
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from .base import BaseHandle
1515
from .constants import FW_PATH, McuType
1616
from .dfu import PandaDFU
17-
from .isotp import isotp_send, isotp_recv
1817
from .spi import PandaSpiHandle, PandaSpiException, PandaProtocolMismatch
1918
from .usb import PandaUsbHandle
2019
from .utils import logger
@@ -795,14 +794,6 @@ def can_clear(self, bus):
795794
"""
796795
self._handle.controlWrite(Panda.REQUEST_OUT, 0xf1, bus, 0, b'')
797796

798-
# ******************* isotp *******************
799-
800-
def isotp_send(self, addr, dat, bus, recvaddr=None, subaddr=None):
801-
return isotp_send(self, dat, addr, bus, recvaddr, subaddr)
802-
803-
def isotp_recv(self, addr, bus=0, sendaddr=None, subaddr=None):
804-
return isotp_recv(self, addr, bus, sendaddr, subaddr)
805-
806797
# ******************* serial *******************
807798

808799
def serial_read(self, port_number):

python/canhandle.py

-53
This file was deleted.

0 commit comments

Comments
 (0)