diff options
| author | Christian Kolset <ckolset@colostate.edu> | 2026-08-10 16:12:05 -0600 |
|---|---|---|
| committer | Christian Kolset <ckolset@colostate.edu> | 2026-08-10 16:12:05 -0600 |
| commit | 5d5bcaed8639a162fda85c8cd0d340c296a054b8 (patch) | |
| tree | a7a1a62fb607c9c85127dab4aab17ccf8e22c906 /devices/arduino_device.py | |
| parent | 46231c00994cd681d598961f2056dbda31c3e483 (diff) | |
Unify Signals/Channels around auto-naming, plot-by-channel, and shared vars
Devices: auto-name from OS-reported port description (Device Manager /
udev string) instead of a generic label; default Serial #Channels 1;
consistent simulate-mode checkbox across backends; inline device rename.
Channels: calibration/filters move out of Signals into a Channel
"Operation" (adds Scale/Offset alongside the existing math kinds);
single-physical-source Channels get an embedded Filters block; new
Channels auto-name/auto-ID from their source and reject duplicate
names/IDs on apply; "Create Channel" button on each Signal row; renamed
"Sources" -> "Signals" in the Channels UI; Signals' READ/WRITE dir badge
(was silently-broken IN/OUT) now reflects the real writable flag.
Plot: default layout is one pane per Channel (not per device, not raw
Signals) titled by channel name; "+ Add Channel" is a checkbox dialog
instead of an inline dropdown; traces get up/down reorder; live unit
changes (e.g. a Mark-10 gauge switching lb/kgF/N/ozF) propagate to an
open pane's axis label without clobbering a manually-typed one.
Control Panel: hardware assignment now picks from the same writable-
Signals list instead of a separate device/channel combo with a
hardcoded Arduino pin list; stale visual indicator when a control's
target device/channel disconnects or disappears; documented the `vars`
bridge (Control Panel On Action Script <-> Channel scripts) in both
directions' help text and script templates.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'devices/arduino_device.py')
| -rw-r--r-- | devices/arduino_device.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/devices/arduino_device.py b/devices/arduino_device.py index 2f5e8e6..3ad0c7b 100644 --- a/devices/arduino_device.py +++ b/devices/arduino_device.py @@ -112,9 +112,14 @@ class ArduinoDevice(BaseDevice): color=_DO_COLORS[i % len(_DO_COLORS)], )) + _desc = ArduinoLayer.describe_port(port) if not simulate else "" + if _desc: + _name = _desc if port in _desc else f"{_desc} ({port})" + else: + _name = f"Arduino ({port})" info = DeviceInfo( device_id=device_id, - name="Arduino", + name=_name, device_type=self.DEVICE_TYPE, description=(f"Arduino — {len(self._analog_pins)} analog, " f"{len(self._di_pins)} DI, {len(self._do_pins)} DO"), |
