From dc45b759b37c36ca5a949408243b8ef9b536db7b Mon Sep 17 00:00:00 2001 From: "mkq48465@ndw2123.isis.cclrc.ac.uk" Date: Thu, 22 Sep 2022 18:14:14 +0100 Subject: [PATCH 1/2] Fix phase returning frequency RE # --- lewis_emulators/tekafg3XXX/interfaces/stream_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lewis_emulators/tekafg3XXX/interfaces/stream_interface.py b/lewis_emulators/tekafg3XXX/interfaces/stream_interface.py index 8af8c88a..771869ae 100644 --- a/lewis_emulators/tekafg3XXX/interfaces/stream_interface.py +++ b/lewis_emulators/tekafg3XXX/interfaces/stream_interface.py @@ -178,7 +178,7 @@ def set_frequency_mode(self, channel: int, new_frequency_mode: str): self._channel(channel).frequency_mode = new_frequency_mode def get_phase(self, channel: int) -> float: - return self._channel(channel).frequency + return self._channel(channel).phase def set_phase(self, channel: int, new_phase: float): self._channel(channel).phase = new_phase From 7707e567e012acad281d960ff1fb96b87579e044 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 23 Sep 2022 11:28:18 +0100 Subject: [PATCH 2/2] Fix emulator bug --- lewis_emulators/tekafg3XXX/interfaces/stream_interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lewis_emulators/tekafg3XXX/interfaces/stream_interface.py b/lewis_emulators/tekafg3XXX/interfaces/stream_interface.py index 771869ae..f56f7778 100644 --- a/lewis_emulators/tekafg3XXX/interfaces/stream_interface.py +++ b/lewis_emulators/tekafg3XXX/interfaces/stream_interface.py @@ -184,10 +184,10 @@ def set_phase(self, channel: int, new_phase: float): self._channel(channel).phase = new_phase def get_burst_status(self, channel: int) -> str: - return 1 if self._channel(channel).burst_status == "ON" else 0 + return self._channel(channel).burst_status def set_burst_status(self, channel: int, new_burst_status: str): - self._channel(channel).burst_status = new_burst_status + self._channel(channel).burst_status = "ON" if new_burst_status in ["ON", "1"] else "OFF" def get_burst_mode(self, channel: int) -> str: return self._channel(channel).burst_mode