diff --git a/athos-screens/build.gradle b/athos-screens/build.gradle index 5af5c63..f7bb7ac 100644 --- a/athos-screens/build.gradle +++ b/athos-screens/build.gradle @@ -2,7 +2,7 @@ description = 'athos-screens' ext.mainClass = hasProperty('mainClass') ? mainClass : 'ch.psi.pshell.workbench.App' ext.title = 'AthosScreens' ext.desc = 'AthosScreens' -ext.ex_options = 'ch.psi.pshell.screenpanel.Options,ch.psi.athos.Options' +ext.ex_options = 'ch.psi.pshell.screenpanel.Options|ch.psi.athos.Options' ext.deploy_type= 'jar' dependencies { diff --git a/correlation/gradle.properties b/correlation/gradle.properties index 38794b7..054313d 100644 --- a/correlation/gradle.properties +++ b/correlation/gradle.properties @@ -2,4 +2,4 @@ action.custom-1=rpm action.custom-1.args=--configure-on-demand -w -x check -x test rpm action.custom-2=publish action.custom-2.args=--configure-on-demand -w -x check -x test publish -action.debug.args=debug --args="-b -d -l -k -g -q -statusbar -size=1000x700 -console_log=SEVERE -m ./src/main/pkg -laf=dark -pipeline_server localhost:8889 -camera_server localhost:8888 -epics_config ch.psi.jcae.ContextFactory.addressList=localhost:54321" +action.debug.args=debug --args="-b -d -l -k -g -q -statusbar -size=1000x700 -console_log=SEVERE -m ./src/main/pkg -laf=dark -pipeline_server localhost:8889 -camera_server localhost:8888 -epics_config ch.psi.jcae.ContextFactory.addressList=localhost:54321e" diff --git a/correlation/src/main/pkg/plugins/Correlation.java b/correlation/src/main/pkg/plugins/Correlation.java index 9aba112..ec8a491 100644 --- a/correlation/src/main/pkg/plugins/Correlation.java +++ b/correlation/src/main/pkg/plugins/Correlation.java @@ -40,57 +40,57 @@ public class Correlation extends Panel { public void onInitialize(int runCount) { if (runCount==0){ super.onInitialize(runCount); - if (App.hasArgument("dx")) { - textDevX.setText(App.getArgumentValue("dx")); + if (App.hasAdditionalArgument("dx")) { + textDevX.setText(App.getAdditionalArgumentValue("dx")); } - if (App.hasArgument("dy")) { - textDevY.setText(App.getArgumentValue("dy")); + if (App.hasAdditionalArgument("dy")) { + textDevY.setText(App.getAdditionalArgumentValue("dy")); } try{ - if (App.hasArgument("dxtype")) { - comboTypeX.setSelectedIndex(Integer.valueOf(App.getArgumentValue("dxtype"))); + if (App.hasAdditionalArgument("dxtype")) { + comboTypeX.setSelectedIndex(Integer.valueOf(App.getAdditionalArgumentValue("dxtype"))); } } catch (Exception ex){ System.err.println(ex.getMessage()); } try{ - if (App.hasArgument("dytype")) { - comboTypeY.setSelectedIndex(Integer.valueOf(App.getArgumentValue("dytype"))); + if (App.hasAdditionalArgument("dytype")) { + comboTypeY.setSelectedIndex(Integer.valueOf(App.getAdditionalArgumentValue("dytype"))); } } catch (Exception ex){ System.err.println(ex.getMessage()); } try{ - if (App.hasArgument("interval")) { - spinnerInterval.setValue(Double.valueOf(App.getArgumentValue("interval"))); + if (App.hasAdditionalArgument("interval")) { + spinnerInterval.setValue(Double.valueOf(App.getAdditionalArgumentValue("interval"))); } } catch (Exception ex){ System.err.println(ex.getMessage()); } try{ - if (App.hasArgument("window")) { - spinnerWindow.setValue(Integer.valueOf(App.getArgumentValue("window"))); + if (App.hasAdditionalArgument("window")) { + spinnerWindow.setValue(Integer.valueOf(App.getAdditionalArgumentValue("window"))); } } catch (Exception ex){ System.err.println(ex.getMessage()); } try{ - if (App.hasArgument("align")) { - checkAlign.setSelected(App.getBoolArgumentValue("align")); + if (App.hasAdditionalArgument("align")) { + checkAlign.setSelected(App.getBoolAdditionalArgumentValue("align")); } } catch (Exception ex){ System.err.println(ex.getMessage()); } try{ - if (App.hasArgument("linear")) { - checkLinear.setSelected(App.getBoolArgumentValue("linear")); + if (App.hasAdditionalArgument("linear")) { + checkLinear.setSelected(App.getBoolAdditionalArgumentValue("linear")); } } catch (Exception ex){ System.err.println(ex.getMessage()); } try{ - if (App.hasArgument("quadratic")) { - checkQuadratic.setSelected(App.getBoolArgumentValue("quadratic")); + if (App.hasAdditionalArgument("quadratic")) { + checkQuadratic.setSelected(App.getBoolAdditionalArgumentValue("quadratic")); } } catch (Exception ex){ System.err.println(ex.getMessage()); diff --git a/persplot/gradle.properties b/persplot/gradle.properties index 2d1f6ef..5063649 100644 --- a/persplot/gradle.properties +++ b/persplot/gradle.properties @@ -1 +1 @@ -action.debug.args=debug --args="-b -d -l -k -n -q -console_log=SEVERE -p PersistencePlot -laf=dark -epics_config ch.psi.jcae.ContextFactory.addressList=localhost:54321" +action.debug.args=debug --args="-b -d -l -k -n -q -console_log=SEVERE -p PersistencePlot -laf=dark -epics_config ch.psi.jcae.ContextFactory.addressList=localhost:54321 -start true TESTIOC:TESTSINUS:SinCalc" diff --git a/persplot/src/main/java/PersistencePlot.java b/persplot/src/main/java/PersistencePlot.java index 8f045dc..6ceefe0 100644 --- a/persplot/src/main/java/PersistencePlot.java +++ b/persplot/src/main/java/PersistencePlot.java @@ -41,8 +41,8 @@ public class PersistencePlot extends Panel{ @Override public void onInitialize(int runCount) { channelSelector.configure(ChannelSelector.Type.Epics, "http://epics-boot-info.psi.ch", "sls", 3000); - if (App.hasArgument("channel")){ - channelSelector.setText(App.getArgumentValue("channel")); + if (App.hasAdditionalArgument()){ + channelSelector.setText(App.getAdditionalArgument()); } if (App.hasArgument("start")){ buttonStartActionPerformed(null); diff --git a/screenpanel-sf/src/main/java/ScreenPanelSF.java b/screenpanel-sf/src/main/java/ScreenPanelSF.java index e2cd926..9ef1993 100755 --- a/screenpanel-sf/src/main/java/ScreenPanelSF.java +++ b/screenpanel-sf/src/main/java/ScreenPanelSF.java @@ -77,6 +77,7 @@ public class ScreenPanelSF extends Panel implements CamServerViewer.CamServerVie SwingUtilities.invokeLater(()->{ try { camServerViewer.initialize(App.getArgumentValue(Options.SP_MODE.getString(null))); + startTimer(1000); } catch (Exception ex) { Logger.getLogger(ScreenPanelSF.class.getName()).log(Level.SEVERE, null, ex); } @@ -85,11 +86,12 @@ public class ScreenPanelSF extends Panel implements CamServerViewer.CamServerVie } catch (Exception ex) { logger.log(Level.SEVERE, null, ex); - } + } } @Override public void onStop() { + stopTimer(); super.onStop(); } @@ -131,22 +133,13 @@ public class ScreenPanelSF extends Panel implements CamServerViewer.CamServerVie @Override protected void onTimer() { for (Device dev : new Device[]{screen, filter}) { - if (dev != null) { + if ((dev != null) && (dev.getState().isNormal())) { dev.request(); } } checkAppState(); - if (App.hasArgument("s")) { - try { - ((Source) getDevice("image")).initialize(); - } catch (IOException ex) { - logger.log(Level.SEVERE, null, ex); - } catch (InterruptedException ex) { - logger.log(Level.SEVERE, null, ex); - } - } try { if (panelPulse.isVisible()){ CamServerViewer.Frame frame = camServerViewer.getCurrentFrame(); diff --git a/screenpanel-sls/build.gradle b/screenpanel-sls/build.gradle index 5040fb9..296a230 100644 --- a/screenpanel-sls/build.gradle +++ b/screenpanel-sls/build.gradle @@ -4,7 +4,7 @@ ext.plugin = 'ScreenPanelSLS' ext.mainClass = hasProperty('mainClass') ? mainClass : 'ch.psi.pshell.workbench.App' ext.title = 'ScreenPanel' ext.desc = 'ScreenPanel customization for SLS cameras' -ext.ex_options = 'ch.psi.pshell.screenpanel.Options' +ext.ex_options = 'ch.psi.pshell.screenpanel.Options|disable_detach (if true does not show debug option for pemanent pipelines)|edit_permanent (if true does not disable pemanent pipeline config options)' ext.deploy_type= 'java' dependencies { diff --git a/screenpanel-sls/src/main/java/ScreenPanelSLS.java b/screenpanel-sls/src/main/java/ScreenPanelSLS.java index 1463a51..2608f53 100755 --- a/screenpanel-sls/src/main/java/ScreenPanelSLS.java +++ b/screenpanel-sls/src/main/java/ScreenPanelSLS.java @@ -8,7 +8,6 @@ import ch.psi.pshell.epics.ChannelDouble; import ch.psi.pshell.epics.Epics; import ch.psi.pshell.imaging.Overlay; import ch.psi.pshell.imaging.Overlays; -import ch.psi.pshell.imaging.Source; import ch.psi.pshell.workbench.App; import ch.psi.pshell.framework.Context; import ch.psi.pshell.framework.Panel; @@ -115,6 +114,7 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi Logger.getLogger(ScreenPanelSLS.class.getName()).log(Level.SEVERE, null, ex); } }).start(); + startTimer(2000); } catch (Exception ex) { Logger.getLogger(ScreenPanelSLS.class.getName()).log(Level.SEVERE, null, ex); } @@ -150,6 +150,7 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi @Override public void onStop() { + stopTimer(); super.onStop(); } @@ -199,23 +200,12 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi @Override protected void onTimer() { - //for (Device dev : new Device[]{screen, exposure}) { - // if (dev != null) { - // dev.request(); - // } - //} - - checkAppState(); - - if (App.hasArgument("s")) { - try { - ((Source) getDevice("image")).initialize(); - } catch (IOException ex) { - logger.log(Level.SEVERE, null, ex); - } catch (InterruptedException ex) { - logger.log(Level.SEVERE, null, ex); + for (Device dev : new Device[]{screen, exposure, flStep, mirror, ledPower}) { + if ((dev != null) && (dev.getState().isNormal())) { + dev.request(); } - } + } + checkAppState(); } @Override