This commit is contained in:
x03daop
2016-07-26 17:08:56 +02:00
parent 9e7746bc4f
commit 6fafe6c687

View File

@@ -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){