mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-22 07:02:29 +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 int readIntervalMillis = 1000;
|
||||
public volatile int readIntervalMillis = 1000;
|
||||
|
||||
private ArrayDisplayParameters arrayDisplayParameters;
|
||||
|
||||
|
@ -45,7 +45,8 @@ public class ArraySensorProcess extends PamProcess {
|
||||
while(true) {
|
||||
readData();
|
||||
try {
|
||||
Thread.sleep(analogSensorControl.getAnalogSensorParams().readIntervalMillis);
|
||||
int slptime = analogSensorControl.getAnalogSensorParams().readIntervalMillis;
|
||||
Thread.sleep(slptime);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ public class BrainBoxDevices implements AnalogDeviceType, PamSettings{
|
||||
double sensData = BBED549.hexToEngineering(bbRanges[item], sensInts);
|
||||
double paramValue = calibration.rawToValue(sensData, calibrationData[item]);
|
||||
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);
|
||||
return new AnalogSensorData(sensData, paramValue);
|
||||
|
||||
|
@ -221,7 +221,7 @@ public class AnalogDiagnosticsDisplay extends UserDisplayComponentAdapter implem
|
||||
break;
|
||||
case 3:
|
||||
if (lastUpdate[rowIndex] > 0) {
|
||||
return PamCalendar.formatTime(lastUpdate[rowIndex]);
|
||||
return PamCalendar.formatTime(lastUpdate[rowIndex], true);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
|
@ -1041,6 +1041,9 @@ public abstract class SQLLogging {
|
||||
* @return a result set
|
||||
*/
|
||||
protected ResultSet createViewResultSet(PamConnection con, PamViewParameters pamViewParameters) {
|
||||
if (con == null) {
|
||||
return null;
|
||||
}
|
||||
String viewerClause = getViewerLoadClause(con.getSqlTypes(), pamViewParameters);
|
||||
return createViewResultSet(con, viewerClause);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user