diff options
Diffstat (limited to 'ui/control_editor.py')
| -rw-r--r-- | ui/control_editor.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/control_editor.py b/ui/control_editor.py index 48de21d..111a71f 100644 --- a/ui/control_editor.py +++ b/ui/control_editor.py @@ -360,9 +360,13 @@ class ControlEditorDialog(QDialog): dev = self.registry.get_instance(dev_id) if not dev: return - # Add actual channels + # Add actual channels (skip disabled — can't be driven while switched + # off — and skip read-only channels — a control writes, so a channel + # with no write mapping should never be offered as a target) for ch in dev.info.channels: - self._ch_cb.addItem(f"{ch.channel_id} ({ch.name})", + if not ch.enabled or not ch.writable: + continue + self._ch_cb.addItem(f"{ch.name} ({ch.channel_id})", userData=ch.channel_id) # For Arduino backends also suggest digital pins for output if hasattr(dev, "backend") and dev.backend == "arduino": |
