Merge pull request #41 from PAMGuard/main

updated x3
This commit is contained in:
Douglas Gillespie 2023-04-24 13:29:09 +01:00 committed by GitHub
commit f74bb5eb89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 45 additions and 1 deletions

View File

@ -784,7 +784,7 @@
<dependency> <dependency>
<groupId>pamguard.org</groupId> <groupId>pamguard.org</groupId>
<artifactId>x3</artifactId> <artifactId>x3</artifactId>
<version>2.2.0</version> <version>2.2.1</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/it.sauronsoftware/jave --> <!-- https://mvnrepository.com/artifact/it.sauronsoftware/jave -->

View File

@ -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>=

Binary file not shown.

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>pamguard.org</groupId>
<artifactId>x3</artifactId>
<version>2.2.1</version>
<description>POM was created from install:install-file</description>
</project>

View File

@ -180,6 +180,7 @@ public abstract class FileListWorker<T extends File> implements PamWorkWrapper<F
T newFile = createFile(moreFiles[i]); T newFile = createFile(moreFiles[i]);
eachFileTask(newFile); eachFileTask(newFile);
newFileList.addFile(newFile); newFileList.addFile(newFile);
Debug.out.println("Adding file " + newFile.getAbsolutePath());
if (i%100 == 0) { if (i%100 == 0) {
sayProgress(pamWorker, newFileList, folder); sayProgress(pamWorker, newFileList, folder);
} }

View File

@ -2078,6 +2078,9 @@ public class PamDataBlock<Tunit extends PamDataUnit> extends PamObservable {
/* /*
* Doesnt notify it's own parent to avoid an infinite loop * 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) { if (notify) {
for (int i = 0; i < countObservers(); i++) { for (int i = 0; i < countObservers(); i++) {
if (getPamObserver(i).getObserverObject() != parentProcess) { if (getPamObserver(i).getObserverObject() != parentProcess) {

View File

@ -1086,6 +1086,9 @@ public class ClickControl extends PamControlledUnit implements PamSettings {
} }
public ClickDisplayManager getDisplayManager(){ public ClickDisplayManager getDisplayManager(){
if (tabPanelControl == null) {
return null;
}
return tabPanelControl.clickDisplayManager; return tabPanelControl.clickDisplayManager;
} }

View File

@ -28,6 +28,7 @@ import java.awt.Component;
import Acquisition.AcquisitionControl; import Acquisition.AcquisitionControl;
import Acquisition.DaqSystem; import Acquisition.DaqSystem;
import PamController.PamControlledUnitSettings;
/** /**
* @author SCANS * @author SCANS
@ -102,6 +103,18 @@ public class STAcquisitionControl extends AcquisitionControl {
return stDaqSystem; 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;
}
} }

View File

@ -88,6 +88,12 @@ public class STAcquisitionProcess extends AcquisitionProcess {
} }
} }
@Override
public float getSampleRate() {
float fs = super.getSampleRate();
return fs;
}
@Override @Override
/** /**
* Override the AcquisitionProcess version of this, because it sets the * Override the AcquisitionProcess version of this, because it sets the
@ -156,4 +162,5 @@ public class STAcquisitionProcess extends AcquisitionProcess {
} }

View File

@ -146,6 +146,10 @@ public class STClickControl extends ClickControl {
*/ */
public void updateDisplayScrollers(long timeMillis) { public void updateDisplayScrollers(long timeMillis) {
ClickDisplayManager dispManager = getDisplayManager(); ClickDisplayManager dispManager = getDisplayManager();
if (dispManager == null) {
// happens in -nogui operation.
return;
}
ArrayList<ClickDisplay> dispList = dispManager.getWindowList(); ArrayList<ClickDisplay> dispList = dispManager.getWindowList();
for (ClickDisplay display : dispList) { for (ClickDisplay display : dispList) {
if (display instanceof ClickBTDisplay) { if (display instanceof ClickBTDisplay) {