From 2afaa454942e4515cb32b29fb1f93a95a4ea75be Mon Sep 17 00:00:00 2001
From: gscalamera <graziano.scalamera@elettra.eu>
Date: Thu, 10 Mar 2022 10:46:08 +0100
Subject: [PATCH] Fix fil timer

---
 src/IntlkGun.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/IntlkGun.cpp b/src/IntlkGun.cpp
index e42c3bf..bb81ceb 100644
--- a/src/IntlkGun.cpp
+++ b/src/IntlkGun.cpp
@@ -464,6 +464,8 @@ void IntlkGun::read_RealFilTimer(Tango::Attribute &attr)
 	timer = 0xffff-timer;
 #else
 	unsigned short timer =  (unsigned short)rawmsg_10[0];
+	if(timer == (unsigned short)(-1))
+		timer = 0;
 #endif
 	real_fil_timer = (float)timer;
 	real_fil_timer /= 60;// div 600 mul 10
-- 
GitLab