mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-19 01:33:52 +08:00
python lib: only import spidev as necessary
This commit is contained in:
@@ -18,7 +18,6 @@ from .update import ensure_st_up_to_date # noqa pylint: disable=import-error
|
||||
from .serial import PandaSerial # noqa pylint: disable=import-error
|
||||
from .isotp import isotp_send, isotp_recv # pylint: disable=import-error
|
||||
from .config import DEFAULT_FW_FN, DEFAULT_H7_FW_FN, SECTOR_SIZES_FX, SECTOR_SIZES_H7 # noqa pylint: disable=import-error
|
||||
from .spi import SpiHandle # noqa pylint: disable=import-error
|
||||
|
||||
__version__ = '0.0.10'
|
||||
|
||||
@@ -253,6 +252,8 @@ class Panda:
|
||||
self._handle = None
|
||||
|
||||
if self._spi:
|
||||
# TODO: move this back. need to wait until next AGNOS build
|
||||
from .spi import SpiHandle # noqa pylint: disable=import-error
|
||||
self._handle = SpiHandle()
|
||||
|
||||
# TODO implement
|
||||
|
||||
Reference in New Issue
Block a user