From 7b799e75899dac5f58316e2c958bc281ffaf6e3d Mon Sep 17 00:00:00 2001
From: awatlet <arnaud.watlet@umons.ac.be>
Date: Thu, 12 Oct 2023 12:27:21 +0200
Subject: [PATCH] Adds pwr_state on tx to switch dps on and off

---
 ohmpi/hardware_components/mb_2024_0_2.py | 48 ++++++++++++------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/ohmpi/hardware_components/mb_2024_0_2.py b/ohmpi/hardware_components/mb_2024_0_2.py
index 970067d3..8b890d89 100644
--- a/ohmpi/hardware_components/mb_2024_0_2.py
+++ b/ohmpi/hardware_components/mb_2024_0_2.py
@@ -99,30 +99,30 @@ class Tx(Tx_mb_2023):
         Tx_mb_2023.inject(self, polarity=polarity, injection_duration=injection_duration)
         self.pin6.value = False
 
-    @property
-    def pwr_state(self):
-        return self._pwr_state
-
-    @pwr_state.setter
-    def pwr_state(self, state, latency=4.):
-        """Switches pwr on or off.
-
-            Parameters
-            ----------
-            state : str
-                'on', 'off'
-            """
-        if state == 'on':
-            self.pin2.value = True
-            self.pin3.value = True
-            self.exec_logger.debug(f'Switching DPS on')
-            self._pwr_state = 'on'
-            time.sleep(latency) # from pwr specs
-        elif state == 'off':
-            self.pin2.value = False
-            self.pin3.value = False
-            self.exec_logger.debug(f'Switching DPS off')
-            self._pwr_state = 'off'
+    # @property
+    # def pwr_state(self):
+    #     return self._pwr_state
+    #
+    # @pwr_state.setter
+    # def pwr_state(self, state, latency=4.):
+    #     """Switches pwr on or off.
+    #
+    #         Parameters
+    #         ----------
+    #         state : str
+    #             'on', 'off'
+    #         """
+    #     if state == 'on':
+    #         self.pin2.value = True
+    #         self.pin3.value = True
+    #         self.exec_logger.debug(f'Switching DPS on')
+    #         self._pwr_state = 'on'
+    #         time.sleep(latency) # from pwr specs
+    #     elif state == 'off':
+    #         self.pin2.value = False
+    #         self.pin3.value = False
+    #         self.exec_logger.debug(f'Switching DPS off')
+    #         self._pwr_state = 'off'
 
 
 class Rx(Rx_mb_2023):
-- 
GitLab