From 81bfe2b87ab43cf43eb8e46e9fbc00facde03d68 Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Thu, 19 Oct 2023 18:17:56 +0200
Subject: [PATCH] Updates current_max

---
 ohmpi/hardware_system.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py
index dd397e4a..e366c0cc 100644
--- a/ohmpi/hardware_system.py
+++ b/ohmpi/hardware_system.py
@@ -43,7 +43,7 @@ for k, v in rx_module.SPECS['rx'].items():
     except Exception as e:
         print(f'Cannot set value {v} in RX_CONFIG[{k}]:\n{e}')
 
-current_max = np.min([TX_CONFIG['current_max'],  HARDWARE_CONFIG['pwr']['current_max'], # TODO: replace 50 by a TX config
+current_max = np.min([TX_CONFIG['current_max'],  HARDWARE_CONFIG['pwr'].pop('current_max', np.inf), # TODO: replace 50 by a TX config
                       np.min(np.hstack((np.inf, [MUX_CONFIG[i].pop('current_max', np.inf) for i in MUX_CONFIG.keys()])))])
 voltage_max = np.min([TX_CONFIG['voltage_max'],
                       np.min(np.hstack((np.inf, [MUX_CONFIG[i].pop('voltage_max', np.inf) for i in MUX_CONFIG.keys()])))])
-- 
GitLab