From 26741d4dded6b3c9ba467b97ada9cad7ea7b2d96 Mon Sep 17 00:00:00 2001 From: su530201 <olivier.kaufmann@umons.ac.be> Date: Tue, 27 Jun 2023 15:15:25 +0200 Subject: [PATCH] Resets self._bias as negative in voltage --- ohmpi/hardware_components/ohmpi_card_3_15.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ohmpi/hardware_components/ohmpi_card_3_15.py b/ohmpi/hardware_components/ohmpi_card_3_15.py index e6eb52a0..71e7ae7e 100644 --- a/ohmpi/hardware_components/ohmpi_card_3_15.py +++ b/ohmpi/hardware_components/ohmpi_card_3_15.py @@ -265,6 +265,6 @@ class Rx(RxAbstract): """ Gets the voltage VMN in Volts """ self.exec_logger.event(f'{self.board_name}\trx_voltage\tbegin\t{datetime.datetime.utcnow()}') - u = -AnalogIn(self._ads_voltage, ads.P0, ads.P1).voltage * self._coef_p2 * 1000. + self._bias # TODO: check if it should be negated + u = -AnalogIn(self._ads_voltage, ads.P0, ads.P1).voltage * self._coef_p2 * 1000. - self._bias # TODO: check if it should be negated self.exec_logger.event(f'{self.board_name}\trx_voltage\tend\t{datetime.datetime.utcnow()}') return u -- GitLab