From e8302e890e151def425ad2cd8828b4b0e1fec7d5 Mon Sep 17 00:00:00 2001
From: Claudio Scafuri <claudio.scafuri@elettra.eu>
Date: Mon, 11 Mar 2024 11:37:45 +0100
Subject: [PATCH] fix Fault command

---
 src/SimulatedE2PS.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/SimulatedE2PS.cpp b/src/SimulatedE2PS.cpp
index 2dc98db..ce2f4ed 100644
--- a/src/SimulatedE2PS.cpp
+++ b/src/SimulatedE2PS.cpp
@@ -498,7 +498,7 @@ void SimulatedE2PS::fault()
 	/* clang-format on */
 
 	//	Add your own code
-	if (get_state() == Tango::ON) return; // command is idempotent
+	if (get_state() == Tango::FAULT) return; // command is idempotent
 	_current_read = 0.0;
 	_current = 0.0;
 	_voltage = 0.0;
-- 
GitLab