From f6a3a130cf649b1a3d1f3c924e460251783fe8f8 Mon Sep 17 00:00:00 2001 From: su530201 <olivier.kaufmann@umons.ac.be> Date: Fri, 5 Apr 2024 14:43:12 +0200 Subject: [PATCH] Changes dps_5005 to dph_5005 --- .dev/test_dps.py | 2 +- .dev/test_mb_2024_1_mux_2024.py | 2 +- .dev/test_mb_2024_3_mux_2024.py | 2 +- ...5.py => test_mb_2024_4_mux_2023_dph5005.py} | 2 +- .dev/test_mb_2024_4_mux_2024.py | 2 +- .dev/test_mb_2024_4_mux_2024_4_mux_2023.py | 2 +- configs/config_mb_2023.py | 2 +- configs/config_mb_2023__1_mux_2024_4roles.py | 2 +- configs/config_mb_2023__2_mux_2024_2roles.py | 2 +- configs/config_mb_2023__2_mux_2024_4roles.py | 2 +- configs/config_mb_2023__3_mux_2024_4roles.py | 2 +- configs/config_mb_2023__4_mux_2023.py | 2 +- configs/config_mb_2023__4_mux_2024_2roles.py | 2 +- configs/config_mb_2023__4_mux_2024_4roles.py | 2 +- configs/config_mb_2024_0_2.py | 2 +- .../config_mb_2024_0_2__1_mux_2024_4roles.py | 2 +- ..._mb_2024_0_2__1_mux_2024_4roles_dph5005.py} | 4 ++-- .../config_mb_2024_0_2__2_mux_2024_2roles.py | 2 +- ..._mb_2024_0_2__2_mux_2024_2roles_dph5005.py} | 4 ++-- .../config_mb_2024_0_2__2_mux_2024_4roles.py | 2 +- ..._mb_2024_0_2__2_mux_2024_4roles_dph5005.py} | 4 ++-- ..._mb_2024_0_2__2_mux_2024_i2cext_dph5005.py} | 0 .../config_mb_2024_0_2__3_mux_2024_4roles.py | 2 +- ..._mb_2024_0_2__3_mux_2024_4roles_dph5005.py} | 4 ++-- configs/config_mb_2024_0_2__4_mux_2023.py | 2 +- ...__4_mux_2023__2_mux_2024_2roles_dph5005.py} | 0 ... config_mb_2024_0_2__4_mux_2023_dph5005.py} | 6 +++--- .../config_mb_2024_0_2__4_mux_2024_2roles.py | 2 +- ..._mb_2024_0_2__4_mux_2024_2roles_dph5005.py} | 4 ++-- .../config_mb_2024_0_2__4_mux_2024_4roles.py | 2 +- ..._mb_2024_0_2__4_mux_2024_4roles_dph5005.py} | 4 ++-- ... config_mb_2024_0_2__8_mux_2023_dph5005.py} | 0 ...ps5005.py => config_mb_2024_0_2_dph5005.py} | 4 ++-- .../{pwr_dps5005.py => pwr_dph5005.py} | 0 ohmpi/ohmpi.py | 3 ++- ohmpi/utils.py | 18 +++++++++--------- setup_config.py | 2 +- 37 files changed, 51 insertions(+), 50 deletions(-) rename .dev/{test_mb_2024_4_mux_2023_dps5005.py => test_mb_2024_4_mux_2023_dph5005.py} (98%) rename configs/{config_mb_2024_0_2__1_mux_2024_4roles_dps5005.py => config_mb_2024_0_2__1_mux_2024_4roles_dph5005.py} (96%) rename configs/{config_mb_2024_0_2__2_mux_2024_2roles_dps5005.py => config_mb_2024_0_2__2_mux_2024_2roles_dph5005.py} (96%) rename configs/{config_mb_2024_0_2__2_mux_2024_4roles_dps5005.py => config_mb_2024_0_2__2_mux_2024_4roles_dph5005.py} (96%) rename configs/{config_mb_2024_0_2__2_mux_2024_i2cext_dps5005.py => config_mb_2024_0_2__2_mux_2024_i2cext_dph5005.py} (100%) rename configs/{config_mb_2024_0_2__3_mux_2024_4roles_dps5005.py => config_mb_2024_0_2__3_mux_2024_4roles_dph5005.py} (97%) rename configs/{config_mb_2024_0_2__4_mux_2023__2_mux_2024_2roles_dps5005.py => config_mb_2024_0_2__4_mux_2023__2_mux_2024_2roles_dph5005.py} (100%) rename configs/{config_mb_2024_0_2__4_mux_2023_dps5005.py => config_mb_2024_0_2__4_mux_2023_dph5005.py} (96%) rename configs/{config_mb_2024_0_2__4_mux_2024_2roles_dps5005.py => config_mb_2024_0_2__4_mux_2024_2roles_dph5005.py} (97%) rename configs/{config_mb_2024_0_2__4_mux_2024_4roles_dps5005.py => config_mb_2024_0_2__4_mux_2024_4roles_dph5005.py} (97%) rename configs/{config_mb_2024_0_2__8_mux_2023_dps5005.py => config_mb_2024_0_2__8_mux_2023_dph5005.py} (100%) rename configs/{config_mb_2024_0_2_dps5005.py => config_mb_2024_0_2_dph5005.py} (96%) rename ohmpi/hardware_components/{pwr_dps5005.py => pwr_dph5005.py} (100%) diff --git a/.dev/test_dps.py b/.dev/test_dps.py index 875dcb68..27130887 100644 --- a/.dev/test_dps.py +++ b/.dev/test_dps.py @@ -1,7 +1,7 @@ import matplotlib matplotlib.use('TkAgg') from ohmpi.utils import change_config -change_config('../configs/config_mb_2024_0_2__4_mux_2024_dps5005.py', verbose=False) +change_config('../configs/config_mb_2024_0_2__4_mux_2024_dph5005.py', verbose=False) import importlib import time import logging diff --git a/.dev/test_mb_2024_1_mux_2024.py b/.dev/test_mb_2024_1_mux_2024.py index 95b21f4f..a1d6cfa0 100644 --- a/.dev/test_mb_2024_1_mux_2024.py +++ b/.dev/test_mb_2024_1_mux_2024.py @@ -1,7 +1,7 @@ import matplotlib matplotlib.use('TkAgg') from ohmpi.utils import change_config -change_config('../configs/config_mb_2024_0_2__1_mux_2024_4roles_dps5005.py', verbose=False) +change_config('../configs/config_mb_2024_0_2__1_mux_2024_4roles_dph5005.py', verbose=False) import importlib import time import logging diff --git a/.dev/test_mb_2024_3_mux_2024.py b/.dev/test_mb_2024_3_mux_2024.py index f34b9964..700d7d9c 100644 --- a/.dev/test_mb_2024_3_mux_2024.py +++ b/.dev/test_mb_2024_3_mux_2024.py @@ -1,7 +1,7 @@ import matplotlib matplotlib.use('TkAgg') from ohmpi.utils import change_config -change_config('../configs/config_mb_2024_0_2__3_mux_2024_4roles_dps5005.py', verbose=False) +change_config('../configs/config_mb_2024_0_2__3_mux_2024_4roles_dph5005.py', verbose=False) import importlib import time import logging diff --git a/.dev/test_mb_2024_4_mux_2023_dps5005.py b/.dev/test_mb_2024_4_mux_2023_dph5005.py similarity index 98% rename from .dev/test_mb_2024_4_mux_2023_dps5005.py rename to .dev/test_mb_2024_4_mux_2023_dph5005.py index b6313962..7d664c89 100644 --- a/.dev/test_mb_2024_4_mux_2023_dps5005.py +++ b/.dev/test_mb_2024_4_mux_2023_dph5005.py @@ -1,7 +1,7 @@ import matplotlib matplotlib.use('TkAgg') from ohmpi.utils import change_config -change_config('../configs/config_mb_2024_0_2__4_mux_2023_dps5005.py', verbose=False) +change_config('../configs/config_mb_2024_0_2__4_mux_2023_dph5005.py', verbose=False) import importlib import time import logging diff --git a/.dev/test_mb_2024_4_mux_2024.py b/.dev/test_mb_2024_4_mux_2024.py index 39fd7d76..58ecee66 100644 --- a/.dev/test_mb_2024_4_mux_2024.py +++ b/.dev/test_mb_2024_4_mux_2024.py @@ -1,7 +1,7 @@ import matplotlib matplotlib.use('TkAgg') from ohmpi.utils import change_config -change_config('../configs/config_mb_2024_0_2__4_mux_2024_4roles_dps5005.py', verbose=False) +change_config('../configs/config_mb_2024_0_2__4_mux_2024_4roles_dph5005.py', verbose=False) import importlib import time import logging diff --git a/.dev/test_mb_2024_4_mux_2024_4_mux_2023.py b/.dev/test_mb_2024_4_mux_2024_4_mux_2023.py index 1c4d03bc..0b67e197 100644 --- a/.dev/test_mb_2024_4_mux_2024_4_mux_2023.py +++ b/.dev/test_mb_2024_4_mux_2024_4_mux_2023.py @@ -1,7 +1,7 @@ import matplotlib matplotlib.use('TkAgg') from ohmpi.utils import change_config -change_config('../configs/config_mb_2024_0_2__4_mux_2023__2_mux_2024_2roles_dps5005.py', verbose=False) +change_config('../configs/config_mb_2024_0_2__4_mux_2023__2_mux_2024_2roles_dph5005.py', verbose=False) import importlib import time import logging diff --git a/configs/config_mb_2023.py b/configs/config_mb_2023.py index 54436911..2ef5840f 100644 --- a/configs/config_mb_2023.py +++ b/configs/config_mb_2023.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2023__1_mux_2024_4roles.py b/configs/config_mb_2023__1_mux_2024_4roles.py index 319207ee..b1c64d6d 100644 --- a/configs/config_mb_2023__1_mux_2024_4roles.py +++ b/configs/config_mb_2023__1_mux_2024_4roles.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2023__2_mux_2024_2roles.py b/configs/config_mb_2023__2_mux_2024_2roles.py index 61be8588..6f14a821 100644 --- a/configs/config_mb_2023__2_mux_2024_2roles.py +++ b/configs/config_mb_2023__2_mux_2024_2roles.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2023__2_mux_2024_4roles.py b/configs/config_mb_2023__2_mux_2024_4roles.py index 6449f867..36cbbc41 100644 --- a/configs/config_mb_2023__2_mux_2024_4roles.py +++ b/configs/config_mb_2023__2_mux_2024_4roles.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2023__3_mux_2024_4roles.py b/configs/config_mb_2023__3_mux_2024_4roles.py index 50392517..0edb73c1 100644 --- a/configs/config_mb_2023__3_mux_2024_4roles.py +++ b/configs/config_mb_2023__3_mux_2024_4roles.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2023__4_mux_2023.py b/configs/config_mb_2023__4_mux_2023.py index 16b57777..66e7ec87 100644 --- a/configs/config_mb_2023__4_mux_2023.py +++ b/configs/config_mb_2023__4_mux_2023.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2023__4_mux_2024_2roles.py b/configs/config_mb_2023__4_mux_2024_2roles.py index 7b13a70d..4735f2c7 100644 --- a/configs/config_mb_2023__4_mux_2024_2roles.py +++ b/configs/config_mb_2023__4_mux_2024_2roles.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2023__4_mux_2024_4roles.py b/configs/config_mb_2023__4_mux_2024_4roles.py index 0b3da754..9b979829 100644 --- a/configs/config_mb_2023__4_mux_2024_4roles.py +++ b/configs/config_mb_2023__4_mux_2024_4roles.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2024_0_2.py b/configs/config_mb_2024_0_2.py index 23c77aa7..de3c949e 100644 --- a/configs/config_mb_2024_0_2.py +++ b/configs/config_mb_2024_0_2.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2024_0_2__1_mux_2024_4roles.py b/configs/config_mb_2024_0_2__1_mux_2024_4roles.py index d337f4a6..4d0bf017 100644 --- a/configs/config_mb_2024_0_2__1_mux_2024_4roles.py +++ b/configs/config_mb_2024_0_2__1_mux_2024_4roles.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2024_0_2__1_mux_2024_4roles_dps5005.py b/configs/config_mb_2024_0_2__1_mux_2024_4roles_dph5005.py similarity index 96% rename from configs/config_mb_2024_0_2__1_mux_2024_4roles_dps5005.py rename to configs/config_mb_2024_0_2__1_mux_2024_4roles_dph5005.py index 2c3e5b12..c3fb537e 100644 --- a/configs/config_mb_2024_0_2__1_mux_2024_4roles_dps5005.py +++ b/configs/config_mb_2024_0_2__1_mux_2024_4roles_dph5005.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. @@ -25,7 +25,7 @@ r_shunt = 2. HARDWARE_CONFIG = { 'ctl': {'model': 'raspberry_pi'}, - 'pwr': {'model': 'pwr_dps5005', 'voltage': 3., 'interface_name': 'modbus'}, + 'pwr': {'model': 'pwr_dph5005', 'voltage': 3., 'interface_name': 'modbus'}, 'tx': {'model': 'mb_2024_0_2', 'voltage_max': 50., # Maximum voltage supported by the TX board [V] 'current_max': 4.80/(50*r_shunt), # Maximum voltage read by the current ADC on the TX board [A] diff --git a/configs/config_mb_2024_0_2__2_mux_2024_2roles.py b/configs/config_mb_2024_0_2__2_mux_2024_2roles.py index 8741734e..a08d9079 100644 --- a/configs/config_mb_2024_0_2__2_mux_2024_2roles.py +++ b/configs/config_mb_2024_0_2__2_mux_2024_2roles.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2024_0_2__2_mux_2024_2roles_dps5005.py b/configs/config_mb_2024_0_2__2_mux_2024_2roles_dph5005.py similarity index 96% rename from configs/config_mb_2024_0_2__2_mux_2024_2roles_dps5005.py rename to configs/config_mb_2024_0_2__2_mux_2024_2roles_dph5005.py index 66f0856b..611b6280 100644 --- a/configs/config_mb_2024_0_2__2_mux_2024_2roles_dps5005.py +++ b/configs/config_mb_2024_0_2__2_mux_2024_2roles_dph5005.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. @@ -25,7 +25,7 @@ r_shunt = 2. HARDWARE_CONFIG = { 'ctl': {'model': 'raspberry_pi'}, - 'pwr': {'model': 'pwr_dps5005', 'voltage': 3., 'interface_name': 'modbus'}, + 'pwr': {'model': 'pwr_dph5005', 'voltage': 3., 'interface_name': 'modbus'}, 'tx': {'model': 'mb_2024_0_2', 'voltage_max': 50., # Maximum voltage supported by the TX board [V] 'current_max': 4.80/(50*r_shunt), # Maximum voltage read by the current ADC on the TX board [A] diff --git a/configs/config_mb_2024_0_2__2_mux_2024_4roles.py b/configs/config_mb_2024_0_2__2_mux_2024_4roles.py index 89317c1d..9b50b845 100644 --- a/configs/config_mb_2024_0_2__2_mux_2024_4roles.py +++ b/configs/config_mb_2024_0_2__2_mux_2024_4roles.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2024_0_2__2_mux_2024_4roles_dps5005.py b/configs/config_mb_2024_0_2__2_mux_2024_4roles_dph5005.py similarity index 96% rename from configs/config_mb_2024_0_2__2_mux_2024_4roles_dps5005.py rename to configs/config_mb_2024_0_2__2_mux_2024_4roles_dph5005.py index 5093dc7e..ab63fb42 100644 --- a/configs/config_mb_2024_0_2__2_mux_2024_4roles_dps5005.py +++ b/configs/config_mb_2024_0_2__2_mux_2024_4roles_dph5005.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. @@ -25,7 +25,7 @@ r_shunt = 2. HARDWARE_CONFIG = { 'ctl': {'model': 'raspberry_pi'}, - 'pwr': {'model': 'pwr_dps5005', 'voltage': 3., 'interface_name': 'modbus'}, + 'pwr': {'model': 'pwr_dph5005', 'voltage': 3., 'interface_name': 'modbus'}, 'tx': {'model': 'mb_2024_0_2', 'voltage_max': 50., # Maximum voltage supported by the TX board [V] 'current_max': 4.80/(50*r_shunt), # Maximum voltage read by the current ADC on the TX board [A] diff --git a/configs/config_mb_2024_0_2__2_mux_2024_i2cext_dps5005.py b/configs/config_mb_2024_0_2__2_mux_2024_i2cext_dph5005.py similarity index 100% rename from configs/config_mb_2024_0_2__2_mux_2024_i2cext_dps5005.py rename to configs/config_mb_2024_0_2__2_mux_2024_i2cext_dph5005.py diff --git a/configs/config_mb_2024_0_2__3_mux_2024_4roles.py b/configs/config_mb_2024_0_2__3_mux_2024_4roles.py index b308ca84..7e0f9467 100644 --- a/configs/config_mb_2024_0_2__3_mux_2024_4roles.py +++ b/configs/config_mb_2024_0_2__3_mux_2024_4roles.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2024_0_2__3_mux_2024_4roles_dps5005.py b/configs/config_mb_2024_0_2__3_mux_2024_4roles_dph5005.py similarity index 97% rename from configs/config_mb_2024_0_2__3_mux_2024_4roles_dps5005.py rename to configs/config_mb_2024_0_2__3_mux_2024_4roles_dph5005.py index b4a4bef9..04a57854 100644 --- a/configs/config_mb_2024_0_2__3_mux_2024_4roles_dps5005.py +++ b/configs/config_mb_2024_0_2__3_mux_2024_4roles_dph5005.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. @@ -25,7 +25,7 @@ r_shunt = 2. HARDWARE_CONFIG = { 'ctl': {'model': 'raspberry_pi'}, - 'pwr': {'model': 'pwr_dps5005', 'voltage': 3., 'interface_name': 'modbus'}, + 'pwr': {'model': 'pwr_dph5005', 'voltage': 3., 'interface_name': 'modbus'}, 'tx': {'model': 'mb_2024_0_2', 'voltage_max': 50., # Maximum voltage supported by the TX board [V] 'current_max': 4.80/(50*r_shunt), # Maximum voltage read by the current ADC on the TX board [A] diff --git a/configs/config_mb_2024_0_2__4_mux_2023.py b/configs/config_mb_2024_0_2__4_mux_2023.py index a85c8d37..62318830 100644 --- a/configs/config_mb_2024_0_2__4_mux_2023.py +++ b/configs/config_mb_2024_0_2__4_mux_2023.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2024_0_2__4_mux_2023__2_mux_2024_2roles_dps5005.py b/configs/config_mb_2024_0_2__4_mux_2023__2_mux_2024_2roles_dph5005.py similarity index 100% rename from configs/config_mb_2024_0_2__4_mux_2023__2_mux_2024_2roles_dps5005.py rename to configs/config_mb_2024_0_2__4_mux_2023__2_mux_2024_2roles_dph5005.py diff --git a/configs/config_mb_2024_0_2__4_mux_2023_dps5005.py b/configs/config_mb_2024_0_2__4_mux_2023_dph5005.py similarity index 96% rename from configs/config_mb_2024_0_2__4_mux_2023_dps5005.py rename to configs/config_mb_2024_0_2__4_mux_2023_dph5005.py index 2ec6fef7..1d2fd7d9 100644 --- a/configs/config_mb_2024_0_2__4_mux_2023_dps5005.py +++ b/configs/config_mb_2024_0_2__4_mux_2023_dph5005.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. @@ -25,7 +25,7 @@ r_shunt = 2. HARDWARE_CONFIG = { 'ctl': {'model': 'raspberry_pi'}, - 'pwr': {'model': 'pwr_dps5005', 'voltage': 3., 'interface_name': 'modbus'}, + 'pwr': {'model': 'pwr_dph5005', 'voltage': 3., 'interface_name': 'modbus'}, 'tx': {'model': 'mb_2024_0_2', 'voltage_max': 50., # Maximum voltage supported by the TX board [V] 'current_max': 4.80/(50*r_shunt), # Maximum voltage read by the current ADC on the TX board [A] @@ -64,7 +64,7 @@ HARDWARE_CONFIG = { 'electrodes': range(1, 65), } }, - 'default': {'interface_name': 'i2c', + 'default': {'interface_name': 'i2c_ext', 'voltage_max': 50., 'current_max': 3.} } diff --git a/configs/config_mb_2024_0_2__4_mux_2024_2roles.py b/configs/config_mb_2024_0_2__4_mux_2024_2roles.py index b4db0809..84c3b009 100644 --- a/configs/config_mb_2024_0_2__4_mux_2024_2roles.py +++ b/configs/config_mb_2024_0_2__4_mux_2024_2roles.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2024_0_2__4_mux_2024_2roles_dps5005.py b/configs/config_mb_2024_0_2__4_mux_2024_2roles_dph5005.py similarity index 97% rename from configs/config_mb_2024_0_2__4_mux_2024_2roles_dps5005.py rename to configs/config_mb_2024_0_2__4_mux_2024_2roles_dph5005.py index 0d0d69ce..72711b9f 100644 --- a/configs/config_mb_2024_0_2__4_mux_2024_2roles_dps5005.py +++ b/configs/config_mb_2024_0_2__4_mux_2024_2roles_dph5005.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. @@ -25,7 +25,7 @@ r_shunt = 2. HARDWARE_CONFIG = { 'ctl': {'model': 'raspberry_pi'}, - 'pwr': {'model': 'pwr_dps5005', 'voltage': 3., 'interface_name': 'modbus'}, + 'pwr': {'model': 'pwr_dph5005', 'voltage': 3., 'interface_name': 'modbus'}, 'tx': {'model': 'mb_2024_0_2', 'voltage_max': 50., # Maximum voltage supported by the TX board [V] 'current_max': 4.80/(50*r_shunt), # Maximum voltage read by the current ADC on the TX board [A] diff --git a/configs/config_mb_2024_0_2__4_mux_2024_4roles.py b/configs/config_mb_2024_0_2__4_mux_2024_4roles.py index d3c1bb27..4710f01e 100644 --- a/configs/config_mb_2024_0_2__4_mux_2024_4roles.py +++ b/configs/config_mb_2024_0_2__4_mux_2024_4roles.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. diff --git a/configs/config_mb_2024_0_2__4_mux_2024_4roles_dps5005.py b/configs/config_mb_2024_0_2__4_mux_2024_4roles_dph5005.py similarity index 97% rename from configs/config_mb_2024_0_2__4_mux_2024_4roles_dps5005.py rename to configs/config_mb_2024_0_2__4_mux_2024_4roles_dph5005.py index 0f17446e..34eac8fb 100644 --- a/configs/config_mb_2024_0_2__4_mux_2024_4roles_dps5005.py +++ b/configs/config_mb_2024_0_2__4_mux_2024_4roles_dph5005.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. @@ -25,7 +25,7 @@ r_shunt = 2. HARDWARE_CONFIG = { 'ctl': {'model': 'raspberry_pi'}, - 'pwr': {'model': 'pwr_dps5005', 'voltage': 3., 'interface_name': 'modbus'}, + 'pwr': {'model': 'pwr_dph5005', 'voltage': 3., 'interface_name': 'modbus'}, 'tx': {'model': 'mb_2024_0_2', 'voltage_max': 50., # Maximum voltage supported by the TX board [V] 'current_max': 4.80/(50*r_shunt), # Maximum voltage read by the current ADC on the TX board [A] diff --git a/configs/config_mb_2024_0_2__8_mux_2023_dps5005.py b/configs/config_mb_2024_0_2__8_mux_2023_dph5005.py similarity index 100% rename from configs/config_mb_2024_0_2__8_mux_2023_dps5005.py rename to configs/config_mb_2024_0_2__8_mux_2023_dph5005.py diff --git a/configs/config_mb_2024_0_2_dps5005.py b/configs/config_mb_2024_0_2_dph5005.py similarity index 96% rename from configs/config_mb_2024_0_2_dps5005.py rename to configs/config_mb_2024_0_2_dph5005.py index 5641b8eb..bbf1437c 100644 --- a/configs/config_mb_2024_0_2_dps5005.py +++ b/configs/config_mb_2024_0_2_dph5005.py @@ -13,7 +13,7 @@ logging_suffix = '' # OhmPi configuration OHMPI_CONFIG = { 'id': ohmpi_id, # Unique identifier of the OhmPi board (string) - 'settings': 'settings/default.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE + 'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE } r_shunt = 2. @@ -25,7 +25,7 @@ r_shunt = 2. HARDWARE_CONFIG = { 'ctl': {'model': 'raspberry_pi'}, - 'pwr': {'model': 'pwr_dps5005', 'voltage': 3., 'interface_name': 'modbus'}, + 'pwr': {'model': 'pwr_dph5005', 'voltage': 3., 'interface_name': 'modbus'}, 'tx': {'model': 'mb_2024_0_2', 'voltage_max': 50., # Maximum voltage supported by the TX board [V] 'current_max': 4.80/(50*r_shunt), # Maximum voltage read by the current ADC on the TX board [A] diff --git a/ohmpi/hardware_components/pwr_dps5005.py b/ohmpi/hardware_components/pwr_dph5005.py similarity index 100% rename from ohmpi/hardware_components/pwr_dps5005.py rename to ohmpi/hardware_components/pwr_dph5005.py diff --git a/ohmpi/ohmpi.py b/ohmpi/ohmpi.py index 193fd288..e9e12cee 100644 --- a/ohmpi/ohmpi.py +++ b/ohmpi/ohmpi.py @@ -663,7 +663,8 @@ class OhmPi(object): vab = self._hw.compute_vab(vab=vab_requested, strategy=strategy, vmn_max=vmn_max, vab_max=vab_max, iab_max=iab_max, vmn_min=vmn_min) # time.sleep(0.5) # to wait for pwr discharge - self._hw.vab_square_wave(vab, cycle_duration=injection_duration*2/duty_cycle, cycles=nb_stack, duty_cycle=duty_cycle) + self._hw.vab_square_wave(vab, cycle_duration=injection_duration*2/duty_cycle, cycles=nb_stack, + duty_cycle=duty_cycle, **kwargs.get('vab_square_wave', {})) self.switch_mux_off(quad, cmd_id) if 'delay' in kwargs.keys(): diff --git a/ohmpi/utils.py b/ohmpi/utils.py index 97c9b3fd..6b0d061b 100644 --- a/ohmpi/utils.py +++ b/ohmpi/utils.py @@ -176,20 +176,20 @@ def generate_preset_configs(configs_to_generate=None): 'config_mb_2023__1_mux_2024_4roles.py', 'config_mb_2023__2_mux_2024_4roles.py', 'config_mb_2023__3_mux_2024_4roles.py', 'config_mb_2023__4_mux_2024_4roles.py', 'config_mb_2023__2_mux_2024_2roles.py', 'config_mb_2023__4_mux_2024_2roles.py', - 'config_mb_2024_0_2.py', 'config_mb_2024_0_2_dps5005.py', - 'config_mb_2024_0_2__4_mux_2023.py', 'config_mb_2024_0_2__4_mux_2023_dps5005.py', + 'config_mb_2024_0_2.py', 'config_mb_2024_0_2_dph5005.py', + 'config_mb_2024_0_2__4_mux_2023.py', 'config_mb_2024_0_2__4_mux_2023_dph5005.py', 'config_mb_2024_0_2__1_mux_2024_4roles.py', - 'config_mb_2024_0_2__1_mux_2024_4roles_dps5005.py', + 'config_mb_2024_0_2__1_mux_2024_4roles_dph5005.py', 'config_mb_2024_0_2__2_mux_2024_4roles.py', - 'config_mb_2024_0_2__2_mux_2024_4roles_dps5005.py', + 'config_mb_2024_0_2__2_mux_2024_4roles_dph5005.py', 'config_mb_2024_0_2__2_mux_2024_2roles.py', - 'config_mb_2024_0_2__2_mux_2024_2roles_dps5005.py', + 'config_mb_2024_0_2__2_mux_2024_2roles_dph5005.py', 'config_mb_2024_0_2__3_mux_2024_4roles.py', - 'config_mb_2024_0_2__3_mux_2024_4roles_dps5005.py', + 'config_mb_2024_0_2__3_mux_2024_4roles_dph5005.py', 'config_mb_2024_0_2__4_mux_2024_4roles.py', - 'config_mb_2024_0_2__4_mux_2024_4roles_dps5005.py', + 'config_mb_2024_0_2__4_mux_2024_4roles_dph5005.py', 'config_mb_2024_0_2__4_mux_2024_2roles.py', - 'config_mb_2024_0_2__4_mux_2024_2roles_dps5005.py' + 'config_mb_2024_0_2__4_mux_2024_2roles_dph5005.py' ] header = """import logging @@ -223,7 +223,7 @@ HARDWARE_CONFIG = { r_shunt = 2. options = {'pwr': {'battery': """{'model': 'pwr_batt', 'voltage': 12., 'interface_name': 'none'},""", - 'dps5005': """{'model': 'pwr_dps5005', 'voltage': 3., 'interface_name': 'modbus'},""" + 'dph5005': """{'model': 'pwr_dph5005', 'voltage': 3., 'interface_name': 'modbus'},""" }, 'mb': {'mb_2024_0_2': {'tx': """{'model': 'mb_2024_0_2', 'voltage_max': 50., # Maximum voltage supported by the TX board [V] diff --git a/setup_config.py b/setup_config.py index ae7c5f93..4690f6b0 100644 --- a/setup_config.py +++ b/setup_config.py @@ -45,7 +45,7 @@ while True: if pwr in ['battery', 'dps5005']: break else: - pwr = input('Tx power: [battery/dps5005]:') + pwr = input('Tx power: [battery/dph5005]:') config = ('config_mb_' + mb[1:] + '_' + nb_mux + '_mux_' + mux[1:]) if roles is not None: -- GitLab