From edd2a67c311d93aa7a8f9b7253fc014ce832d80c Mon Sep 17 00:00:00 2001 From: Arnaud Watlet <arnaud.watlet@umons.ac.be> Date: Mon, 22 Jan 2024 14:28:21 +0100 Subject: [PATCH] adds ohmpi_measure led --- ohmpi/hardware_system.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py index 3a38eafb..67894a95 100644 --- a/ohmpi/hardware_system.py +++ b/ohmpi/hardware_system.py @@ -491,10 +491,15 @@ class OhmPiHardware: if self.pwr_state == 'off': self.pwr_state = 'on' switch_tx_pwr_off = True + + # Switches on measuring LED + self.tx.measuring = 'on' + self.tx.voltage = vab if self.tx.pwr.pwr_state == 'off': self.tx.pwr.pwr_state = 'on' switch_pwr_off = True + if 1. / self.rx.sampling_rate > pulse_duration: sampling_rate = 1. / pulse_duration # TODO: check this... else: @@ -611,7 +616,8 @@ class OhmPiHardware: switch_tx_pwr_off = True #Switches on measuring LED - self.tx.measuring = 'on' + if self.tx.measuring == 'off': + self.tx.measuring = 'on' if self.tx.pwr.pwr_state == 'off': self.tx.pwr.pwr_state = 'on' -- GitLab