From aa7f18eaa2ad85b248e52f06ff7d2fbe6a773f11 Mon Sep 17 00:00:00 2001 From: Douglas Gillespie <50671166+douggillespie@users.noreply.github.com> Date: Wed, 2 Nov 2022 10:09:30 +0000 Subject: [PATCH] SAIL CArd warnings Don't display in dialog when in nogui mode. Write to terminal --- src/hfDaqCard/SmruDaqSystem.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hfDaqCard/SmruDaqSystem.java b/src/hfDaqCard/SmruDaqSystem.java index 1d78e824..c6af0d72 100644 --- a/src/hfDaqCard/SmruDaqSystem.java +++ b/src/hfDaqCard/SmruDaqSystem.java @@ -17,6 +17,7 @@ import Acquisition.DaqSystem; import Acquisition.AudioDataQueue; import PamController.PamControlledUnitSettings; import PamController.PamController; +import PamController.PamGUIManager; import PamController.PamSettingManager; import PamController.PamSettings; import PamDetection.RawDataUnit; @@ -192,7 +193,12 @@ public class SmruDaqSystem extends DaqSystem implements PamSettings { + " in another instance of PAMGuard. \n" + "Check that no other instances of PAMGuard are open and try again. \nIf no other instances of PAMGuard are open " + "then you should cycle the power on the card(s) and restart PAMGuard"); - JOptionPane.showMessageDialog(daqControl.getGuiFrame(), msg, daqControl.getUnitName() + " Error", JOptionPane.ERROR_MESSAGE); + if (PamGUIManager.getGUIType() == PamGUIManager.NOGUI) { + System.out.println(msg); + } + else { + JOptionPane.showMessageDialog(daqControl.getGuiFrame(), msg, daqControl.getUnitName() + " Error", JOptionPane.ERROR_MESSAGE); + } PamController.getInstance().stopLater(); return false; }