diff --git a/cw/waverunner.py b/cw/waverunner.py index bc602ce66..d3815ddd4 100755 --- a/cw/waverunner.py +++ b/cw/waverunner.py @@ -372,10 +372,11 @@ def capture_and_transfer_waves(self): res = self._ask("WAIT 10;*OPC?") assert res == "*OPC 1" # Transfer and parse waveform data. - # TODO test this! - # data = self._ask_raw(b"C3:WF? DAT1") - data = self._ask_raw(b"C1:WF? DAT1") - # data = self._ask_raw(f"{self.acqu_channel}:WF? DAT1") + if self.acqu_channel == "C1": data = self._ask_raw(b"C1:WF? DAT1") + elif self.acqu_channel == "C2": data = self._ask_raw(b"C2:WF? DAT1") + elif self.acqu_channel == "C3": data = self._ask_raw(b"C3:WF? DAT1") + elif self.acqu_channel == "C4": data = self._ask_raw(b"C4:WF? DAT1") + else: print("WAVERUNNER: Error: Channel selection invalid") waves = self._parse_waveform(data) return waves