From 2b9943ba0d28449a590acfa8a41555b174b6ba84 Mon Sep 17 00:00:00 2001 From: Christian Kolset Date: Mon, 27 Apr 2026 16:53:14 -0600 Subject: Improved arduino interface. Now allowing the user to configure pins on the fly. --- devices/digital_io.py | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'devices/digital_io.py') 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 = ""): -- cgit v1.2.3