diff --git a/hardware/abstract_hardware.py b/hardware/abstract_hardware.py index 7b7773f749f182a2783c36c404b2ea4d023a5742..17f465c9d9048da2e6696b1654073f749c2fd11b 100644 --- a/hardware/abstract_hardware.py +++ b/hardware/abstract_hardware.py @@ -27,7 +27,6 @@ class TxAbstract(ABC): self._inj_time = None self._dps_state = 'off' self._adc_gain = 1. - print(f'polarity : {polarity}') self.polarity = polarity self.inj_time = inj_time self.exec_logger.debug(f'{self.board_name} TX initialization') diff --git a/hardware/dummy_tx.py b/hardware/dummy_tx.py index a3c552181253c646c462e1dec6e971f1c3a24cae..09a270a44a2d6bc1eb451b0af2ac6fadfaa22cbb 100644 --- a/hardware/dummy_tx.py +++ b/hardware/dummy_tx.py @@ -17,7 +17,7 @@ dps_switch_on_warmup = 4. # seconds tx_low_battery = 12. # V 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['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['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) diff --git a/hardware/mb_2024_rev_0_0.py b/hardware/mb_2024_rev_0_0.py index 37e86d4d9c36e0a665eb8f7c7f70c86452343f7d..9eff9597fd234480d914800fded362b0f7073cd5 100644 --- a/hardware/mb_2024_rev_0_0.py +++ b/hardware/mb_2024_rev_0_0.py @@ -35,7 +35,7 @@ dps_switch_on_warmup = 4. # seconds tx_low_battery = 12. # V 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['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['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) diff --git a/hardware/ohmpi_card_3.15.py b/hardware/ohmpi_card_3_15.py similarity index 98% rename from hardware/ohmpi_card_3.15.py rename to hardware/ohmpi_card_3_15.py index 2a89a12d444de58be7a7dc452aeaa1987bf6edb8..016701545f87c4719e74bccdbfb1a4bb6027dbb5 100644 --- a/hardware/ohmpi_card_3.15.py +++ b/hardware/ohmpi_card_3_15.py @@ -27,14 +27,12 @@ RX_CONFIG['voltage_max'] = np.min([voltage_adc_voltage_max, RX_CONFIG.pop('volta # ADC for current current_adc_voltage_min = 10. # mV current_adc_voltage_max = 4500. # mV - -# DPS dps_voltage_max = 12. # V dps_default_voltage = 12. # V 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['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['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) diff --git a/test_ohmpi_card_3.15.py b/test_ohmpi_card_3.15.py new file mode 100644 index 0000000000000000000000000000000000000000..7dfcf9df89a076cdcb958024c838fb4065f12793 --- /dev/null +++ b/test_ohmpi_card_3.15.py @@ -0,0 +1,13 @@ +import sys +sys.path.extend(['/home/su530201/PycharmProjects/ohmpi_reversaal/OhmPi']) +from OhmPi.hardware.ohmpi_card_3_15 import Tx +from OhmPi.hardware.ohmpi_card_3_15 import Rx +from OhmPi.logging_setup import create_stdout_logger + +exec_logger = create_stdout_logger(name='exec') +soh_logger = create_stdout_logger(name='soh') + +print('\nCreating TX...') +tx = Tx(exec_logger= exec_logger, soh_logger= soh_logger) +print('\nCreating RX...') +rx = Rx(exec_logger= exec_logger, soh_logger= soh_logger)