Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Get rid of _drivers package and use relative imports
Browse files Browse the repository at this point in the history
Change-Id: I71fea77340c278319f2dd0d98591f81adddaa6a8
  • Loading branch information
dmitriykovalev committed Nov 11, 2019
1 parent ab3b2cb commit 489af73
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 15 deletions.
File renamed without changes.
Empty file removed src/aiy/_drivers/__init__.py
Empty file.
5 changes: 2 additions & 3 deletions src/aiy/toneplayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@
:any:`aiy.pins.BUZZER_GPIO_PIN`.
"""


import time
import re
import time

from aiy._drivers._buzzer import PWMController
from ._buzzer import PWMController


class Rest:
Expand Down
4 changes: 2 additions & 2 deletions src/aiy/trackplayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import re
import time

from aiy._drivers._buzzer import PWMController
from aiy.toneplayer import Note
from .toneplayer import Note
from ._buzzer import PWMController


class Command:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
import socket
import struct

from aiy._drivers import _spicomm

from . import _spicomm

class _SpiTransport:
"""Communicate with VisionBonnet over SPI bus."""
Expand Down
4 changes: 2 additions & 2 deletions src/aiy/vision/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import time
from collections import namedtuple

import aiy.vision.proto.protocol_pb2 as pb2
from aiy._drivers._transport import make_transport
from .proto import protocol_pb2 as pb2
from ._transport import make_transport

logger = logging.getLogger(__name__)

Expand Down
12 changes: 6 additions & 6 deletions src/tests/spicomm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

import aiy.vision.proto.protocol_pb2 as pb2

from aiy._drivers._spicomm import SPICOMM_DEV
from aiy._drivers._spicomm import SPICOMM_IOCTL_TRANSACT
from aiy._drivers._spicomm import SPICOMM_IOCTL_TRANSACT_MMAP
from aiy.vision._spicomm import SPICOMM_DEV
from aiy.vision._spicomm import SPICOMM_IOCTL_TRANSACT
from aiy.vision._spicomm import SPICOMM_IOCTL_TRANSACT_MMAP

from aiy._drivers._spicomm import AsyncSpicomm
from aiy._drivers._spicomm import SyncSpicomm
from aiy._drivers._spicomm import SyncSpicommMmap
from aiy.vision._spicomm import AsyncSpicomm
from aiy.vision._spicomm import SyncSpicomm
from aiy.vision._spicomm import SyncSpicommMmap


@contextlib.contextmanager
Expand Down

0 comments on commit 489af73

Please sign in to comment.