diff --git a/pom.xml b/pom.xml
index 64d85708..a3a6110d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -805,7 +805,7 @@
pamguard.org
x3
- 2.2.0
+ 2.2.1
diff --git a/repo/pamguard/org/x3/2.2.1/_remote.repositories b/repo/pamguard/org/x3/2.2.1/_remote.repositories
new file mode 100644
index 00000000..51f219b8
--- /dev/null
+++ b/repo/pamguard/org/x3/2.2.1/_remote.repositories
@@ -0,0 +1,4 @@
+#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
+#Mon Apr 24 10:32:52 BST 2023
+x3-2.2.1.jar>=
+x3-2.2.1.pom>=
diff --git a/repo/pamguard/org/x3/2.2.1/x3-2.2.1.jar b/repo/pamguard/org/x3/2.2.1/x3-2.2.1.jar
new file mode 100644
index 00000000..a80ce5cd
Binary files /dev/null and b/repo/pamguard/org/x3/2.2.1/x3-2.2.1.jar differ
diff --git a/repo/pamguard/org/x3/2.2.1/x3-2.2.1.pom b/repo/pamguard/org/x3/2.2.1/x3-2.2.1.pom
new file mode 100644
index 00000000..ff69a57c
--- /dev/null
+++ b/repo/pamguard/org/x3/2.2.1/x3-2.2.1.pom
@@ -0,0 +1,9 @@
+
+
+ 4.0.0
+ pamguard.org
+ x3
+ 2.2.1
+ POM was created from install:install-file
+
diff --git a/src/PamUtils/worker/filelist/FileListWorker.java b/src/PamUtils/worker/filelist/FileListWorker.java
index e613ced0..e71a5f62 100644
--- a/src/PamUtils/worker/filelist/FileListWorker.java
+++ b/src/PamUtils/worker/filelist/FileListWorker.java
@@ -180,6 +180,7 @@ public abstract class FileListWorker implements PamWorkWrapper extends PamObservable {
/*
* Doesnt notify it's own parent to avoid an infinite loop
*/
+ if (Float.isNaN(sampleRate)) {
+ System.out.println("NaN sample rate being set in " + getLongDataName());
+ }
if (notify) {
for (int i = 0; i < countObservers(); i++) {
if (getPamObserver(i).getObserverObject() != parentProcess) {
diff --git a/src/clickDetector/ClickControl.java b/src/clickDetector/ClickControl.java
index e5b6fce9..5bd48dd9 100644
--- a/src/clickDetector/ClickControl.java
+++ b/src/clickDetector/ClickControl.java
@@ -1086,6 +1086,9 @@ public class ClickControl extends PamControlledUnit implements PamSettings {
}
public ClickDisplayManager getDisplayManager(){
+ if (tabPanelControl == null) {
+ return null;
+ }
return tabPanelControl.clickDisplayManager;
}
diff --git a/src/soundtrap/STAcquisitionControl.java b/src/soundtrap/STAcquisitionControl.java
index 09eebc77..bfad1da2 100644
--- a/src/soundtrap/STAcquisitionControl.java
+++ b/src/soundtrap/STAcquisitionControl.java
@@ -28,6 +28,7 @@ import java.awt.Component;
import Acquisition.AcquisitionControl;
import Acquisition.DaqSystem;
+import PamController.PamControlledUnitSettings;
/**
* @author SCANS
@@ -102,6 +103,18 @@ public class STAcquisitionControl extends AcquisitionControl {
return stDaqSystem;
}
+ @Override
+ public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings) {
+ // TODO Auto-generated method stub
+ boolean ok = super.restoreSettings(pamControlledUnitSettings);
+ if (Float.isNaN(this.getAcquisitionParameters().sampleRate)) {
+ System.out.println("Nan sample rate read back in sound trap data control. ");
+ this.getAcquisitionParameters().sampleRate = 384000.f;
+ }
+
+ return ok;
+ }
+
}
diff --git a/src/soundtrap/STAcquisitionProcess.java b/src/soundtrap/STAcquisitionProcess.java
index caf2583a..1b99ef31 100644
--- a/src/soundtrap/STAcquisitionProcess.java
+++ b/src/soundtrap/STAcquisitionProcess.java
@@ -87,6 +87,12 @@ public class STAcquisitionProcess extends AcquisitionProcess {
}
}
}
+
+ @Override
+ public float getSampleRate() {
+ float fs = super.getSampleRate();
+ return fs;
+ }
@Override
/**
@@ -150,6 +156,7 @@ public class STAcquisitionProcess extends AcquisitionProcess {
public boolean isStalled() {
return false;
}
+
diff --git a/src/soundtrap/STClickControl.java b/src/soundtrap/STClickControl.java
index 0f251106..f80c1ca6 100644
--- a/src/soundtrap/STClickControl.java
+++ b/src/soundtrap/STClickControl.java
@@ -146,6 +146,10 @@ public class STClickControl extends ClickControl {
*/
public void updateDisplayScrollers(long timeMillis) {
ClickDisplayManager dispManager = getDisplayManager();
+ if (dispManager == null) {
+ // happens in -nogui operation.
+ return;
+ }
ArrayList dispList = dispManager.getWindowList();
for (ClickDisplay display : dispList) {
if (display instanceof ClickBTDisplay) {