PSSS improvements
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import ch.psi.pshell.bs.PipelineServer;
|
||||
import ch.psi.pshell.core.Context;
|
||||
import ch.psi.pshell.epics.ChannelDouble;
|
||||
import ch.psi.pshell.imaging.RendererMode;
|
||||
import ch.psi.pshell.plot.Plot;
|
||||
import ch.psi.pshell.plot.LinePlotJFree;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.Convert;
|
||||
import ch.psi.utils.State;
|
||||
import ch.psi.utils.Str;
|
||||
import java.awt.CardLayout;
|
||||
@@ -51,6 +53,16 @@ public class PSSS extends Panel {
|
||||
|
||||
spinnerAverage.setValue(( (Number) eval("get_psss_averaging()", true)).intValue());
|
||||
|
||||
try{
|
||||
Double energy = (((ChannelDouble)getDevice("energy_machine")).take(-1));
|
||||
energy=Convert.roundDouble(energy, 0);
|
||||
spFromEn.setValue(energy-150);
|
||||
spToEn.setValue(energy+150);
|
||||
} catch (Exception ex) {
|
||||
getLogger().log(Level.WARNING, null, ex);
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception ex) {
|
||||
getLogger().log(Level.WARNING, null, ex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user