Skip to content

Commit

Permalink
Move isotp.py, ccp.py and xcp.py to opendbc (#2166)
Browse files Browse the repository at this point in the history
* Move ccp.py and xcp.py to opendbc

* move isotp

* more cleanup
  • Loading branch information
pd0wm authored Feb 26, 2025
1 parent 0924df1 commit a744fa7
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 837 deletions.
3 changes: 1 addition & 2 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from .python.constants import McuType, BASEDIR, FW_PATH, USBPACKET_MAX_SIZE # noqa: F401
from .python.spi import PandaSpiException, PandaProtocolMismatch, STBootloaderSPIHandle # noqa: F401
from .python.serial import PandaSerial # noqa: F401
from .python.canhandle import CanHandle # noqa: F401
from .python.utils import logger # noqa: F401
from .python import (Panda, PandaDFU, isotp, # noqa: F401
from .python import (Panda, PandaDFU, # noqa: F401
pack_can_buffer, unpack_can_buffer, calculate_checksum,
DLC_TO_LEN, LEN_TO_DLC, CANPACKET_HEAD_SIZE)

Expand Down
2 changes: 1 addition & 1 deletion examples/query_vin_and_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from opendbc.car.structs import CarParams
from panda import Panda
from hexdump import hexdump
from panda.python.isotp import isotp_send, isotp_recv
from opendbc.car.isotp import isotp_send, isotp_recv

# 0x7e0 = Toyota
# 0x18DB33F1 for Honda?
Expand Down
9 changes: 0 additions & 9 deletions python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
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
Expand Down Expand Up @@ -795,14 +794,6 @@ def can_clear(self, bus):
"""
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):
Expand Down
53 changes: 0 additions & 53 deletions python/canhandle.py

This file was deleted.

Loading

0 comments on commit a744fa7

Please sign in to comment.