This commit is contained in:
gobbo_a
2016-09-28 09:30:04 +02:00
parent acc7e42f50
commit 8b7d06f6cf
2 changed files with 25 additions and 12 deletions

View File

@@ -572,7 +572,7 @@ public class ScreenPanel extends Panel {
int profileSize = Math.min(data.getWidth(), data.getHeight())/4;
try {
double[] sum = (double[]) Convert.toDouble(data.integrateVertically());
double[] sum = (double[]) Convert.toDouble(data.integrateVertically(true));
int[] x = Arr.indexesInt(sum.length);
DescriptiveStatistics stats = new DescriptiveStatistics(sum);
double min = stats.getMin();
@@ -600,7 +600,7 @@ public class ScreenPanel extends Panel {
}
try {
double[] sum = (double[]) Convert.toDouble(data.integrateHorizontally());
double[] sum = (double[]) Convert.toDouble(data.integrateHorizontally(true));
int[] x = Arr.indexesInt(sum.length);
DescriptiveStatistics stats = new DescriptiveStatistics(sum);
double min = stats.getMin();
@@ -1707,9 +1707,12 @@ public class ScreenPanel extends Panel {
if (laserOn){
setLaserState(false);
}
((Camtool) camera).captureBackground(5);
if (laserOn){
setLaserState(true);
try{
((Camtool) camera).captureBackground(5);
} finally{
if (laserOn){
setLaserState(true);
}
}
}
}
@@ -1811,7 +1814,17 @@ public class ScreenPanel extends Panel {
setpoint = new ChannelInteger(null, cameraName + ":SET_SCREEN1_POS");
setpoint.initialize();
if (setpoint.read() != index) {
setpoint.write(index);
boolean laserOn = getLaserState();
if (laserOn){
setLaserState(false);
}
try{
setpoint.write(index);
} finally{
if (laserOn){
setLaserState(true);
}
}
}
screen.read();
} catch (Exception ex) {