Skip to content

Commit

Permalink
Merge pull request #41 from SweepMe/use-portmanager
Browse files Browse the repository at this point in the history
Use PortManager to obtain ports in get_driver()
  • Loading branch information
fk3 authored Nov 5, 2024
2 parents a1e55ea + 96588c6 commit c714004
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/pysweepme/DeviceManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from .Architecture import version_info
from .EmptyDeviceClass import EmptyDevice
from .ErrorMessage import error
from .Ports import get_port
from .PortManager import PortManager


def get_main_py_path(path: str) -> str:
Expand Down Expand Up @@ -121,7 +121,8 @@ def setup_driver(driver: EmptyDevice, name: str, port_string: str) -> None:
"""
if port_string != "":
if driver.port_manager:
port = get_port(port_string, driver.port_properties)
port_manager = PortManager()
port = port_manager.get_port(port_string, driver.port_properties)
driver.set_port(port)

driver.set_parameters({"Port": port_string, "Device": name})
Expand Down
2 changes: 1 addition & 1 deletion src/pysweepme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# SOFTWARE.


__version__ = "1.5.6.11"
__version__ = "1.5.6.12"

import sys

Expand Down

0 comments on commit c714004

Please sign in to comment.