From: Alexandra Lanes Date: Sat, 18 Jun 2022 19:06:09 +0000 (+0200) Subject: Use standard DEVICE_PORT property X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ajlanes/git?a=commitdiff_plain;h=b65ee0638dec03b99e2f7211d9b673a914f50c0b;p=legofocuser.git Use standard DEVICE_PORT property --- diff --git a/legofocuser.py b/legofocuser.py index 607d52a..d80c73f 100755 --- a/legofocuser.py +++ b/legofocuser.py @@ -39,17 +39,17 @@ class LegoFocuser(device): mainloop """ - # BUILD_HAT_PORT - the port on the Build HAT to which the + # DEVICE_PORT - the port on the Build HAT to which the # motor is connected. - if name == "BUILD_HAT_PORT": + if name == "DEVICE_PORT": try: port = self.IUUpdate(device, name, names, values) port.state='Ok' port["PORT"].value = port["PORT"].value.strip() self.IDSet(port) except Exception as error: - self.IDMessage(f"BUILD_HAT_PORT error: {error}") + self.IDMessage(f"DEVICE_PORT error: {error}") self.IUUpdate(device, name, names, values, Set=True) diff --git a/legofocuser.xml b/legofocuser.xml index 6ad85e6..ab7e155 100644 --- a/legofocuser.xml +++ b/legofocuser.xml @@ -9,7 +9,7 @@ On - + A