Startup
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user