From 0f854eb7cb17e61d9832ba8f64904440eeb94da6 Mon Sep 17 00:00:00 2001 From: Christian Koernig <ckoernig@mail.desy.de> Date: Wed, 14 Apr 2021 14:03:05 +0200 Subject: [PATCH] Changed Tango server to always retrive new Status Packet when checking device state - call of Enable() should change the State to MOVING before returing --- include/AmptekHardwareInterface.h | 2 +- python/amptek_hardware_interface/AmptekPX5 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/AmptekHardwareInterface.h b/include/AmptekHardwareInterface.h index 2bbdfb7..bac4007 100644 --- a/include/AmptekHardwareInterface.h +++ b/include/AmptekHardwareInterface.h @@ -32,7 +32,7 @@ public: void connectSimulator(); void connectUDP(std::string hostname, int port, double timeout); - + bool Enable(); bool Disable(); bool Ping(); diff --git a/python/amptek_hardware_interface/AmptekPX5 b/python/amptek_hardware_interface/AmptekPX5 index edc877c..94cd39e 100644 --- a/python/amptek_hardware_interface/AmptekPX5 +++ b/python/amptek_hardware_interface/AmptekPX5 @@ -677,7 +677,7 @@ class AmptekPX5(Device): if Device.dev_state(self) == tango.DevState.ALARM: return tango.DevState.ALARM - enabled = self.IsEnabled(self._max_info_age) + enabled = self.IsEnabled(0) if enabled: self.set_state(tango.DevState.MOVING) else: -- GitLab