summaryrefslogtreecommitdiff
path: root/devices/digital_io.py
diff options
context:
space:
mode:
authorChristian Kolset <christian.kolset@gmail.com>2026-04-27 16:53:14 -0600
committerChristian Kolset <christian.kolset@gmail.com>2026-04-27 16:53:14 -0600
commit2b9943ba0d28449a590acfa8a41555b174b6ba84 (patch)
treee8bef8c9bc61dd7e2f9c8a9b177058a4b09546db /devices/digital_io.py
parent67cfa0a514c7de4605ed7360e15a81aa781e510e (diff)
Improved arduino interface. Now allowing the user to configure pins on the fly.
Diffstat (limited to 'devices/digital_io.py')
-rw-r--r--devices/digital_io.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/devices/digital_io.py b/devices/digital_io.py
index 96c6ca5..53395dc 100644
--- a/devices/digital_io.py
+++ b/devices/digital_io.py
@@ -275,7 +275,6 @@ class DigitalIOConfigWidget(QWidget):
def __init__(self, device: DigitalIODevice):
super().__init__()
self.device = device
- self._buttons: Dict[str, QPushButton] = {}
self._build()
def _build(self):
@@ -313,30 +312,6 @@ class DigitalIOConfigWidget(QWidget):
self.be_cb.currentTextChanged.connect(self._update_visibility)
root.addWidget(be_grp)
self._update_visibility(self.device.backend)
-
- out_grp = QGroupBox("Digital Outputs")
- out_lay = QVBoxLayout(out_grp)
- for ch in (c for c in self.device.info.channels if c.channel_id.startswith("do")):
- row = QHBoxLayout()
- lbl = QLabel(ch.name)
- lbl.setMinimumWidth(50)
- btn = QPushButton("OFF")
- btn.setCheckable(True)
- btn.setChecked(bool(self.device._output_state.get(ch.channel_id, 0)))
- btn.setObjectName("digitalOutBtn")
- cid = ch.channel_id
-
- def _tog(checked, c=cid, b=btn):
- self.device.write_channel(c, checked)
- b.setText("ON" if checked else "OFF")
-
- btn.toggled.connect(_tog)
- row.addWidget(lbl)
- row.addWidget(btn)
- out_lay.addLayout(row)
- self._buttons[ch.channel_id] = btn
-
- root.addWidget(out_grp)
root.addStretch()
def _update_visibility(self, backend: str = ""):