From b833938a0257f091cb6e2dda112eea0fd8430cb9 Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Tue, 2 May 2023 18:46:05 +0200
Subject: [PATCH] Rewrites TX voltage handling

---
 hardware_components/ohmpi_card_3_15.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hardware_components/ohmpi_card_3_15.py b/hardware_components/ohmpi_card_3_15.py
index 0057df53..6604c133 100644
--- a/hardware_components/ohmpi_card_3_15.py
+++ b/hardware_components/ohmpi_card_3_15.py
@@ -39,6 +39,7 @@ dps_switch_on_warmup = 0.  # seconds
 TX_CONFIG['current_min'] = np.min([current_adc_voltage_min / (TX_CONFIG['r_shunt'] * 50), TX_CONFIG.pop('current_min', np.inf)])  # mA
 TX_CONFIG['current_max'] = np.min([current_adc_voltage_max / (TX_CONFIG['r_shunt'] * 50), TX_CONFIG.pop('current_max', np.inf)])  # mA
 TX_CONFIG['voltage_max'] = np.min([dps_voltage_max, TX_CONFIG.pop('voltage_max', np.inf)])  # V
+TX_CONFIG['voltage_min'] = -TX_CONFIG['voltage_max']  # V
 TX_CONFIG['default_voltage'] = np.min([TX_CONFIG.pop('default_voltage', dps_default_voltage), TX_CONFIG['voltage_max']])  # V
 TX_CONFIG['dps_switch_on_warm_up'] = TX_CONFIG.pop('dps_switch_on_warmup', dps_switch_on_warmup)
 TX_CONFIG['mcp_board_address'] = TX_CONFIG.pop('mcp_board_address', tx_mcp_board_address)
-- 
GitLab