From e920126f261953ced6227f26ee41f7bdc764ef5c Mon Sep 17 00:00:00 2001 From: gobbo_a Date: Thu, 8 Jan 2026 14:53:08 +0100 Subject: [PATCH] Update psss_panel --- psss-panel/src/main/pkg/plugins/PSSS.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/psss-panel/src/main/pkg/plugins/PSSS.java b/psss-panel/src/main/pkg/plugins/PSSS.java index 121b182..5e18cbe 100755 --- a/psss-panel/src/main/pkg/plugins/PSSS.java +++ b/psss-panel/src/main/pkg/plugins/PSSS.java @@ -1,6 +1,8 @@ import ch.psi.pshell.device.Device; import ch.psi.pshell.device.DeviceListener; import ch.psi.pshell.camserver.PipelineSource; +import ch.psi.pshell.device.Cacheable; +import ch.psi.pshell.device.ProcessVariable; import ch.psi.pshell.framework.Context; import ch.psi.pshell.framework.Panel; import ch.psi.pshell.device.Register; @@ -79,12 +81,12 @@ public class PSSS extends Panel { spinnerAverage.setValue(( (Number) eval("get_psss_averaging()", true)).intValue()); try{ - Double energy = (((ChannelDouble)getDevice("energy_machine")).take(-1)); + Double energy = (((Cacheable)getDevice("energy_machine")).take(-1)).doubleValue(); energy=Convert.roundDouble(energy, 0); spFromEn.setValue(energy-150); spToEn.setValue(energy+150); } catch (Exception ex) { - getLogger().warning("Error reading energy_machine"); + getLogger().warning("Error reading energy_machine: " + ex.toString()); } this.getDevice("psss_energy").addListener(new DeviceListener() {