diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bf67ec286c615d7bfa81950dba1c98c00e6c15d1..c045c3bf0afcf64dcb99f13b233436dbc961c1c3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,10 +7,8 @@ pages: script: - apt-get update - apt-get install --assume-yes pandoc - - pip install numpy pandas termcolor paho-mqtt zmq # top import of Ohmpi.py + - pip install numpy pandas termcolor paho-mqtt zmq tqdm # top import of Ohmpi.py - pip install sphinx numpydoc sphinx_rtd_theme pandoc recommonmark linuxdoc - - cp configs/config_default.py ohmpi/config.py # only compile doc with dummy if not on rpi with correct config.py - - export PYTHONPATH=`pwd` - cd doc - make html diff --git a/ohmpi/config.py b/ohmpi/config.py index 1c889c6385dbd4ba2d84c32300df5c5e2a70564f..411cad0432beea238964192e620b155581d159bf 100644 --- a/ohmpi/config.py +++ b/ohmpi/config.py @@ -17,58 +17,49 @@ OHMPI_CONFIG = { } r_shunt = 2. - -# default properties of system components that will be -# overwritten by properties defined in each the board dict below. -# if bounds are defined in board specs, values out of specs will be bounded to remain in specs -# omitted properties in config will be set to board specs default values if they exist - HARDWARE_CONFIG = { 'ctl': {'model': 'raspberry_pi'}, 'pwr': {'model': 'pwr_batt', 'voltage': 12., 'interface_name': 'none'}, '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] - 'r_shunt': r_shunt, # Shunt resistance in Ohms - 'interface_name': 'i2c', - 'vmn_hardware_offset': 2500. - }, + '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] + 'r_shunt': r_shunt, # Shunt resistance in Ohms + 'interface_name': 'i2c' + }, 'rx': {'model': 'mb_2024_0_2', - 'latency': 0.010, # latency in seconds in continuous mode - 'sampling_rate': 50, # number of samples per second - 'interface_name': 'i2c', - }, + 'latency': 0.010, # latency in seconds in continuous mode + 'sampling_rate': 200, # number of samples per second + 'interface_name': 'i2c' + }, 'mux': {'boards': - {'mux_A': - {'model': 'mux_2023_0_X', - 'mux_tca_address': 0x70, - 'roles': 'A', - 'electrodes': range(1, 65), - }, + {'mux_A': + {'model': 'mux_2023_0_X', + 'mux_tca_address': 0x70, + 'roles': 'A', + 'electrodes': range(1, 65)}, 'mux_B': - {'model': 'mux_2023_0_X', - 'mux_tca_address': 0x71, - 'roles': 'B', - 'electrodes': range(1, 65), - }, + {'model': 'mux_2023_0_X', + 'mux_tca_address': 0x71, + 'roles': 'B', + 'electrodes': range(1, 65)}, 'mux_M': - {'model': 'mux_2023_0_X', - 'mux_tca_address': 0x72, - 'roles': 'M', - 'electrodes': range(1, 65), - }, + {'model': 'mux_2023_0_X', + 'mux_tca_address': 0x72, + 'roles': 'M', + 'electrodes': range(1, 65)}, 'mux_N': - {'model': 'mux_2023_0_X', - 'mux_tca_address': 0x73, - 'roles': 'N', - 'electrodes': range(1, 65), - } + {'model': 'mux_2023_0_X', + 'mux_tca_address': 0x73, + 'roles': 'N', + 'electrodes': range(1, 65), + } }, - 'default': {'interface_name': 'i2c', - 'voltage_max': 50., - 'current_max': 3.} - } -} + 'default': {'interface_name': 'i2c_ext', + 'voltage_max': 50., + 'current_max': 3.} + } + } + # SET THE LOGGING LEVELS, MQTT BROKERS AND MQTT OPTIONS ACCORDING TO YOUR NEEDS # Execution logging configuration EXEC_LOGGING_CONFIG = { @@ -97,7 +88,7 @@ DATA_LOGGING_CONFIG = { SOH_LOGGING_CONFIG = { 'logging_level': logging.INFO, 'logging_to_console': True, - 'log_file_logging_level': logging.INFO, + 'log_file_logging_level': logging.DEBUG, 'file_name': f'soh{logging_suffix}.log', 'max_bytes': 16777216, 'backup_count': 1024,