Startup
This commit is contained in:
@@ -468,6 +468,9 @@ public class ScreenPanel extends Panel {
|
||||
return (Integer) state.get("run");
|
||||
}
|
||||
}
|
||||
|
||||
Thread tcomboScreen;
|
||||
Thread tcomboFilter;
|
||||
|
||||
void setCamera(String cameraName) throws IOException, InterruptedException {
|
||||
System.out.println("Setting camera: " + cameraName + " [" + (buttonCamtool.isSelected() ? "camtool" : "direct") + "]");
|
||||
@@ -493,6 +496,14 @@ public class ScreenPanel extends Panel {
|
||||
renderer.removeOverlays(userOv);
|
||||
renderer.clear();
|
||||
renderer.resetZoom();
|
||||
|
||||
if ((tcomboScreen!=null) && (tcomboScreen.isAlive())){
|
||||
tcomboScreen.interrupt();
|
||||
}
|
||||
|
||||
if ((tcomboFilter!=null) && (tcomboFilter.isAlive())){
|
||||
tcomboFilter.interrupt();
|
||||
}
|
||||
|
||||
if (screen != null) {
|
||||
screen.close();
|
||||
@@ -504,7 +515,7 @@ public class ScreenPanel extends Panel {
|
||||
}
|
||||
|
||||
//Parallelizing initialization
|
||||
Thread tcomboScreen = new Thread(() -> {
|
||||
tcomboScreen = new Thread(() -> {
|
||||
try {
|
||||
screen = new DiscretePositioner("CurrentScreen", cameraName + ":SET_SCREEN1_POS", cameraName + ":GET_SCREEN1_POS");
|
||||
screen.initialize();
|
||||
@@ -525,7 +536,7 @@ public class ScreenPanel extends Panel {
|
||||
});
|
||||
tcomboScreen.start();
|
||||
|
||||
Thread tcomboFilter = new Thread(() -> {
|
||||
tcomboFilter = new Thread(() -> {
|
||||
try {
|
||||
filter = new DiscretePositioner("CurrentFilter", cameraName + ":SET_FILTER", cameraName + ":GET_FILTER");
|
||||
filter.initialize();
|
||||
|
||||
Reference in New Issue
Block a user