Skip to content

Commit 18eeda6

Browse files
author
Peter Braun
committed
remove status from readables
1 parent 6025ca1 commit 18eeda6

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

src/secop_ophyd/SECoPDevices.py

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -309,25 +309,6 @@ def __init__(
309309
)
310310
self.param_devices[parameter] = getattr(self, parameter)
311311

312-
# Add status Sigal (neither config nor read signal)
313-
if "status" in module_desc["parameters"].keys():
314-
315-
properties = module_desc["parameters"]["status"]
316-
317-
# generate new root path
318-
param_path = Path(parameter_name="status", module_name=module_name)
319-
320-
# readonly propertyns to plans and plan stubs.
321-
readonly = properties.get("readonly", None)
322-
323-
# Normal types + (struct and tuple as JSON object Strings)
324-
self._signal_from_parameter(
325-
path=param_path,
326-
sig_name="status",
327-
readonly=readonly,
328-
)
329-
self.param_devices["status"] = getattr(self, "status")
330-
331312
# Initialize Command Devices
332313
for command, properties in module_desc["commands"].items():
333314
# generate new root path
@@ -367,6 +348,21 @@ def __init__(
367348

368349
self.set_name(module_name)
369350

351+
# Add status Signal AFTER set_name() to avoid auto-registration as config/hinted
352+
# This is only needed as long as Tiled can't handle structured numpy arrays
353+
if "status" in module_desc["parameters"].keys():
354+
properties = module_desc["parameters"]["status"]
355+
param_path = Path(parameter_name="status", module_name=module_name)
356+
readonly = properties.get("readonly", None)
357+
358+
# Create signal without adding to readables
359+
self._signal_from_parameter(
360+
path=param_path,
361+
sig_name="status",
362+
readonly=readonly,
363+
)
364+
self.param_devices["status"] = getattr(self, "status")
365+
370366
def generate_cmd_plan(
371367
self,
372368
cmd_dev: SECoPCMDDevice,

0 commit comments

Comments
 (0)