Skip to content

Commit

Permalink
OPUSInterface: Wait for response from EM27 before signalling device i…
Browse files Browse the repository at this point in the history
…s open

Closes #667.
  • Loading branch information
alexdewar committed Nov 27, 2024
1 parent 290e1bf commit 57e29fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions finesse/hardware/plugins/spectrometer/opus_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class OPUSInterface(
"This is rate limited to around one request every two seconds by OPUS."
),
},
async_open=True,
):
"""Interface for communicating with the OPUS program.
Expand Down Expand Up @@ -122,6 +123,10 @@ def _on_reply_received(self, reply: QNetworkReply) -> None:

# If the status has changed, notify listeners
if new_status != self._status:
# On first update, we need to signal that the device is now open
if self._status == SpectrometerStatus.UNDEFINED:
self.signal_is_opened()

self._status = new_status
self.send_status_message(new_status)

Expand Down

0 comments on commit 57e29fd

Please sign in to comment.