From 6fafe6c68795ba4153d181bf2f278d9f77e91a43 Mon Sep 17 00:00:00 2001 From: x03daop Date: Tue, 26 Jul 2016 17:08:56 +0200 Subject: [PATCH] Startup --- plugins/HoloScan.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/HoloScan.java b/plugins/HoloScan.java index c87344b7..e8188ce4 100644 --- a/plugins/HoloScan.java +++ b/plugins/HoloScan.java @@ -40,6 +40,7 @@ public class HoloScan extends Panel { public void onInitialize(int runCount) { Motor phi = (Motor) getDevice("ManipulatorPhi"); Motor theta = (Motor) getDevice("ManipulatorTheta"); + Scienta scienta = (Scienta) getDevice("Scienta"); motorPanelPhi.setDevice(phi); motorPanelTheta.setDevice(theta); dvpAcqTime.setDevice(scienta.getAcquisitionTime()); @@ -60,13 +61,12 @@ public class HoloScan extends Panel { } protected void onTimer(){ - try{ - Scienta scienta = (Scienta) getDevice("Scienta"); + try{ int steps = (radioSteps.isSelected() ? (Integer)spinnerStepsPhi.getValue() * (Integer)spinnerStepsTheta.getValue() : (int)(Math.abs((Double)spinnerToPhi.getValue() - (Double)spinnerFromPhi.getValue()) / (Integer)spinnerStepSizePhi.getValue() + 1) * - (int)(Math.abs((Double)spinnerToTheta.getValue() - (Double)spinnerFromTheta.getValue()) / (Integer)spinnerStepSizeTheta.getValue() +1)); - int seconds = (int) ((Double)scienta.getAcquisitionTime().take() * steps); + (int)(Math.abs((Double)spinnerToTheta.getValue() - (Double)spinnerFromTheta.getValue()) / (Integer)spinnerStepSizeTheta.getValue() +1)); + int seconds = (int) (Double.valueOf(dvpAcqTime.getLabel().getText()) * steps); LocalTime time = LocalTime.ofSecondOfDay(seconds); textTotalTime.setText(time.toString()); } catch (Exception ex){