Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(hardware): constants from firmware #8995

Merged
merged 3 commits into from
Dec 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions hardware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ format:
dev:
echo "Nothing here yet"

.PHONY: opentrons_ot3_firmware_dist
opentrons_ot3_firmware_dist: Pipfile.lock
mkdir -p dist
$(python) ../scripts/bundle_installed_package.py opentrons_ot3_firmware dist

.PHONY: push-no-restart
push-no-restart: wheel
Expand All @@ -109,11 +113,11 @@ push-no-restart: wheel
push: push-no-restart
$(call restart-service,$(host),$(br_ssh_key),$(ssh_opts),"jupyter-notebook opentrons-robot-server")


.PHONY: push-no-restart-ot3
push-no-restart-ot3: $(sdist_file)
echo $(sdist_file)
push-no-restart-ot3: $(sdist_file) Pipfile.lock
echo $(sdist_file) $(wildcard dist/opentrons_ot3_firmware-*.tar.gz)
$(call push-python-sdist,$(host),,$(ssh_opts),$(sdist_file),/opt/opentrons-robot-server,"opentrons_hardware")
$(call push-python-sdist,$(host),,$(ssh_opts),$(wildcard dist/opentrons_ot3_firmware-*.tar.gz),/opt/opentrons-robot-server,"opentrons_ot3_firmware")

.PHONY: push-ot3
push-ot3: push-no-restart-ot3
Expand Down
1 change: 1 addition & 0 deletions hardware/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ name = "pypi"
python-can = "==3.3.4"
pyserial = "==3.5"
typing-extensions = "==3.10.0.0"
opentrons-ot3-firmware = {subdirectory = "python", git = "https://github.com/Opentrons/ot3-firmware.git", branch = "main"}

[dev-packages]
pytest = "==6.1.0"
Expand Down
792 changes: 538 additions & 254 deletions hardware/Pipfile.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions hardware/opentrons_hardware/drivers/can_bus/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""Can bus drivers package."""

from .driver import CanDriver
from .message import CanMessage
from .arbitration_id import (
from .can_messenger import CanMessenger
from opentrons_ot3_firmware.message import CanMessage
from opentrons_ot3_firmware.arbitration_id import (
ArbitrationId,
ArbitrationIdParts,
)
from .constants import NodeId, FunctionCode, MessageId
from .can_messenger import CanMessenger
from opentrons_ot3_firmware.constants import NodeId, FunctionCode, MessageId


__all__ = [
Expand Down
51 changes: 0 additions & 51 deletions hardware/opentrons_hardware/drivers/can_bus/arbitration_id.py

This file was deleted.

13 changes: 8 additions & 5 deletions hardware/opentrons_hardware/drivers/can_bus/can_messenger.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@

from opentrons_hardware.drivers.can_bus import (
CanDriver,
NodeId,

)
from opentrons_ot3_firmware.arbitration_id import (
ArbitrationId,
ArbitrationIdParts,
CanMessage,
MessageId,

)
from opentrons_ot3_firmware.message import CanMessage
from opentrons_ot3_firmware.constants import NodeId, MessageId
from abc import ABC, abstractmethod

from opentrons_hardware.drivers.can_bus.messages.messages import (
from opentrons_ot3_firmware.messages.messages import (
MessageDefinition,
get_definition,
)
from opentrons_hardware.utils import BinarySerializableException
from opentrons_ot3_firmware.utils import BinarySerializableException

log = logging.getLogger(__name__)

Expand Down
64 changes: 0 additions & 64 deletions hardware/opentrons_hardware/drivers/can_bus/constants.py

This file was deleted.

4 changes: 2 additions & 2 deletions hardware/opentrons_hardware/drivers/can_bus/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

from can import Notifier, Bus, AsyncBufferedReader, Message, util

from .arbitration_id import ArbitrationId
from .message import CanMessage
from opentrons_ot3_firmware.arbitration_id import ArbitrationId
from opentrons_ot3_firmware.message import CanMessage
from .errors import ErrorFrameCanError

log = logging.getLogger(__name__)
Expand Down
13 changes: 0 additions & 13 deletions hardware/opentrons_hardware/drivers/can_bus/message.py

This file was deleted.

This file was deleted.

Loading