mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-25 16:42:27 +00:00
update to array diagnostics and sensor control
This commit is contained in:
parent
d5f504dcd1
commit
8e60ad2eff
@ -10,7 +10,7 @@ public class ArraySensorParams implements Serializable, Cloneable, ManagedParame
|
|||||||
|
|
||||||
public static final long serialVersionUID = 1L;
|
public static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public int readIntervalMillis = 1000;
|
public volatile int readIntervalMillis = 1000;
|
||||||
|
|
||||||
private ArrayDisplayParameters arrayDisplayParameters;
|
private ArrayDisplayParameters arrayDisplayParameters;
|
||||||
|
|
||||||
|
@ -45,7 +45,8 @@ public class ArraySensorProcess extends PamProcess {
|
|||||||
while(true) {
|
while(true) {
|
||||||
readData();
|
readData();
|
||||||
try {
|
try {
|
||||||
Thread.sleep(analogSensorControl.getAnalogSensorParams().readIntervalMillis);
|
int slptime = analogSensorControl.getAnalogSensorParams().readIntervalMillis;
|
||||||
|
Thread.sleep(slptime);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ public class BrainBoxDevices implements AnalogDeviceType, PamSettings{
|
|||||||
double sensData = BBED549.hexToEngineering(bbRanges[item], sensInts);
|
double sensData = BBED549.hexToEngineering(bbRanges[item], sensInts);
|
||||||
double paramValue = calibration.rawToValue(sensData, calibrationData[item]);
|
double paramValue = calibration.rawToValue(sensData, calibrationData[item]);
|
||||||
analogDevicesManager.notifyData(new ItemAllData(item, sensInts, sensData, paramValue));
|
analogDevicesManager.notifyData(new ItemAllData(item, sensInts, sensData, paramValue));
|
||||||
// System.out.printf("Read item %d, chan %d, int %d, real %3.5f, param %3.5f\n", iChan, chan, sensInts, sensData, paramValue);
|
// System.out.printf("Read item %d, chan %d, int %d, real %3.5f, param %3.5f\n", 0, chan, sensInts, sensData, paramValue);
|
||||||
sayError(null);
|
sayError(null);
|
||||||
return new AnalogSensorData(sensData, paramValue);
|
return new AnalogSensorData(sensData, paramValue);
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ public class AnalogDiagnosticsDisplay extends UserDisplayComponentAdapter implem
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (lastUpdate[rowIndex] > 0) {
|
if (lastUpdate[rowIndex] > 0) {
|
||||||
return PamCalendar.formatTime(lastUpdate[rowIndex]);
|
return PamCalendar.formatTime(lastUpdate[rowIndex], true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
@ -1041,6 +1041,9 @@ public abstract class SQLLogging {
|
|||||||
* @return a result set
|
* @return a result set
|
||||||
*/
|
*/
|
||||||
protected ResultSet createViewResultSet(PamConnection con, PamViewParameters pamViewParameters) {
|
protected ResultSet createViewResultSet(PamConnection con, PamViewParameters pamViewParameters) {
|
||||||
|
if (con == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
String viewerClause = getViewerLoadClause(con.getSqlTypes(), pamViewParameters);
|
String viewerClause = getViewerLoadClause(con.getSqlTypes(), pamViewParameters);
|
||||||
return createViewResultSet(con, viewerClause);
|
return createViewResultSet(con, viewerClause);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user