summaryrefslogtreecommitdiff
path: root/devices/serial_device.py
diff options
context:
space:
mode:
authorChristian Kolset <ckolset@colostate.edu>2026-07-27 17:34:30 -0600
committerChristian Kolset <ckolset@colostate.edu>2026-07-27 17:34:30 -0600
commitee4965f4d4d1fc5d40be24b99341620e32386d40 (patch)
tree0dbafaa8aee899895b974ade9c9a2c7b66918701 /devices/serial_device.py
parentc3f07a7ffa320aecb3fca5dd40e7644424bddfb5 (diff)
Enhance protocol layers: implement I/O locking for thread safety in serial communication
Diffstat (limited to 'devices/serial_device.py')
-rw-r--r--devices/serial_device.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/devices/serial_device.py b/devices/serial_device.py
index ca551c6..dc92b12 100644
--- a/devices/serial_device.py
+++ b/devices/serial_device.py
@@ -313,6 +313,16 @@ class SerialDevice(BaseDevice):
color=_COLORS[color_idx % len(_COLORS)],
))
color_idx += 1
+ # Write-only action channels — motor must be enabled (ME) before VS/MA take effect
+ for cmd, label in (("ME", "Enable"), ("MD", "Disable")):
+ channels.append(ChannelConfig(
+ channel_id=f"{mid}_{cmd}",
+ name=f"{mid} {label}",
+ unit="",
+ min_value=0.0, max_value=1.0,
+ color=_COLORS[color_idx % len(_COLORS)],
+ ))
+ color_idx += 1
return channels or [ChannelConfig("M1_TP", "M1 TP", "counts", color=_COLORS[0])]
return []