From 5b369efe2d9eeef2da7f5b6e02990a7baf3f78c9 Mon Sep 17 00:00:00 2001 From: gac-x03da Date: Tue, 15 Aug 2023 11:39:59 +0200 Subject: [PATCH] Closedown --- plugins/HoloScan.java | 12 +++++------- plugins/ManipulatorScan.java | 11 ++++++----- plugins/PhotonEnergy.java | 7 +++---- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/plugins/HoloScan.java b/plugins/HoloScan.java index fe30a5b0..35bcfe0b 100644 --- a/plugins/HoloScan.java +++ b/plugins/HoloScan.java @@ -2,11 +2,9 @@ * Copyright (c) 2014 Paul Scherrer Institute. All rights reserved. */ -import ch.psi.pshell.device.Device; -import ch.psi.pshell.device.DeviceAdapter; import ch.psi.pshell.device.Motor; -import ch.psi.pshell.epics.Scienta; -import ch.psi.pshell.ui.Panel; +import ch.psi.pshell.device.Startable; +import ch.psi.pshell.epics.AreaDetector; import ch.psi.pshell.ui.ScriptProcessor; import ch.psi.utils.State; import ch.psi.utils.swing.SwingUtils; @@ -42,10 +40,10 @@ public class HoloScan extends ScriptProcessor { public void onInitialize(int runCount) { Motor phi = (Motor) getDevice("ManipulatorPhi"); Motor theta = (Motor) getDevice("ManipulatorTheta"); - Scienta scienta = (Scienta) getDevice("Scienta"); + AreaDetector scienta = (Scienta) getDevice("Scienta"); motorPanelPhi.setDevice(phi); motorPanelTheta.setDevice(theta); - dvpAcqTime.setDevice(scienta.getAcquisitionTime()); + dvpAcqTime.setDevice(scienta.getChild(scienta.getName() + " acquire time")); try{ spinnerFromPhi.setModel(new SpinnerNumberModel(Math.max(phi.getMinValue(),(Double)spinnerFromPhi.getValue()), phi.getMinValue(), phi.getMaxValue(), 1.0)); spinnerToPhi.setModel(new SpinnerNumberModel(Math.min(phi.getMaxValue(),(Double)spinnerToPhi.getValue()), phi.getMinValue(), phi.getMaxValue(), 1.0)); @@ -633,7 +631,7 @@ public class HoloScan extends ScriptProcessor { private void buttonAbortActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAbortActionPerformed try { abort(); - ((Scienta) getDevice("Scienta")).stop(); + ((Startable) getDevice("Scienta")).stop(); } catch (Exception ex) { showException(ex); } diff --git a/plugins/ManipulatorScan.java b/plugins/ManipulatorScan.java index 52f78a4f..7dee0517 100644 --- a/plugins/ManipulatorScan.java +++ b/plugins/ManipulatorScan.java @@ -3,7 +3,8 @@ */ import ch.psi.pshell.device.Motor; -import ch.psi.pshell.epics.Scienta; +import ch.psi.pshell.device.Startable; +import ch.psi.pshell.epics.AreaDetector; import ch.psi.pshell.ui.ScriptProcessor; import ch.psi.utils.State; import ch.psi.utils.swing.SwingUtils; @@ -40,10 +41,10 @@ public class ManipulatorScan extends ScriptProcessor { @Override public void onInitialize(int runCount) { comboMotorActionPerformed(null); - Scienta scienta = (Scienta) getDevice("Scienta"); - dvpAcqTime.setDevice(scienta.getAcquisitionTime()); + AreaDetector scienta = (AreaDetector) getDevice("Scienta"); + dvpAcqTime.setDevice(scienta.getChild(scienta.getName() + " acquire time")); } - + protected void onTimer(){ try{ int steps = radioSteps.isSelected() ? @@ -607,7 +608,7 @@ public class ManipulatorScan extends ScriptProcessor { private void buttonAbortActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAbortActionPerformed try { abort(); - getDevice("Scienta").stop(); + ((Startable) getDevice("Scienta")).stop(); } catch (Exception ex) { showException(ex); } diff --git a/plugins/PhotonEnergy.java b/plugins/PhotonEnergy.java index fc0d5ec8..86bbed43 100644 --- a/plugins/PhotonEnergy.java +++ b/plugins/PhotonEnergy.java @@ -2,11 +2,10 @@ * Copyright (c) 2014 Paul Scherrer Institute. All rights reserved. */ -import ch.psi.pshell.epics.Scienta; +import ch.psi.pshell.epics.AreaDetector; import ch.psi.pshell.scan.Scan; import ch.psi.pshell.scan.ScanListener; import ch.psi.pshell.scan.ScanRecord; -import ch.psi.pshell.ui.Panel; import ch.psi.pshell.ui.ScriptProcessor; import ch.psi.utils.Convert; import ch.psi.utils.State; @@ -53,8 +52,8 @@ public class PhotonEnergy extends ScriptProcessor { @Override public void onInitialize(int runCount) { - Scienta scienta = (Scienta) getDevice("Scienta"); - dvpAcqTime.setDevice(scienta.getAcquisitionTime()); + AreaDetector scienta = (AreaDetector) getDevice("Scienta"); + dvpAcqTime.setDevice(scienta.getChild(scienta.getName() + " acquire time")); updateTable(); }