Calback for scripts when change puck loading

This commit is contained in:
gac-S_Changer
2019-06-13 10:56:52 +02:00
parent 1969d8253e
commit b06ac7e390

View File

@@ -697,11 +697,12 @@ public class Controller {
try {
if (puckLoading) {
getMainFrame().evalAsync(name + ".enable(); " + name + ".polling = 100", true).handle(errorHandler);
currentDetection = basePlate.getDetection();
currentDetection = basePlate.getDetection();
} else if (getState().isInitialized()) {
getMainFrame().evalAsync(name + ".polling = 0; " + name + ".disable()", true).handle(errorHandler);
onPuckScanned(null);
onPuckScanned(null);
}
getMainFrame().evalAsync("onPuckLoadingChange(" + (puckLoading ? "True" : "False") + ")");
} catch (Exception ex) {
errorHandler.apply(null, ex);
}