Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions Gui/QtGUIutils/QtApplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -1329,10 +1329,19 @@ def goExpert(self):
def GlobalStop(self):
print("Critical status detected: Emitting Global Stop signal")
self.globalStop.emit()
self.instruments.off()
if self.expertMode:
self.releaseHVPowerPanel()
self.releaseLVPowerPanel()
try:
self.instruments.off()
if self.expertMode:
self.releaseHVPowerPanel()
self.releaseLVPowerPanel()
except Exception:
QMessageBox.critical(
None,
"Cold Box Connection Error",
"Warning: connection lost with the cold box.\n\n"
"The instruments could not be switched off. Please check the "
"connection to the cold box.",
)

###############################################################
## Main page and related functions (END)
Expand Down Expand Up @@ -1373,7 +1382,16 @@ def closeEvent(self, event):
logger.debug("Failed to stop Tessie monitoring cleanly during application shutdown")
print("Application terminated")
if self.instruments is not None:
self.instruments.off()
try:
self.instruments.off()
except Exception:
QMessageBox.critical(
None,
"Cold Box Connection Error",
"Warning: connection lost with the cold box.\n\n"
"The instruments could not be switched off during shutdown. "
"Please check the connection to the cold box.",
)

# If you didn't start the Peltier controller, tempPower won't be defined
if site_settings.cooler == "Peltier":
Expand Down
Loading