diff --git a/ohmpi/hardware_components/mb_2023_0_X.py b/ohmpi/hardware_components/mb_2023_0_X.py index dd0cc6c081314d5dcfce9bba40922a8ac1cdd476..c7f03e056b9b0c776d6cad12ff7d7f156639a826 100644 --- a/ohmpi/hardware_components/mb_2023_0_X.py +++ b/ohmpi/hardware_components/mb_2023_0_X.py @@ -69,11 +69,12 @@ class Tx(TxAbstract): if 'model' not in kwargs.keys(): for key in SPECS['tx'].keys(): kwargs = enforce_specs(kwargs, SPECS['tx'], key) - self.exec_logger.event(f'{self.model}\ttx_init\tstart\t{datetime.datetime.utcnow()}') subclass_init = False else: subclass_init = True super().__init__(**kwargs) + if not subclass_init: + self.exec_logger.event(f'{self.model}\ttx_init\tstart\t{datetime.datetime.utcnow()}') assert isinstance(self.connection, I2C) kwargs.update({'pwr': kwargs.pop('pwr', SPECS['tx']['compatible_power_sources']['default'])}) if (kwargs['pwr'] != SPECS['tx']['compatible_power_sources']['default'] @@ -215,11 +216,12 @@ class Rx(RxAbstract): if 'model' not in kwargs.keys(): for key in SPECS['rx'].keys(): kwargs = enforce_specs(kwargs, SPECS['rx'], key) - self.exec_logger.event(f'{self.model}\trx_init\tstart\t{datetime.datetime.utcnow()}') subclass_init = False else: subclass_init = True super().__init__(**kwargs) + if not subclass_init: + self.exec_logger.event(f'{self.model}\trx_init\tstart\t{datetime.datetime.utcnow()}') assert isinstance(self.connection, I2C) self.exec_logger.event(f'{self.model}\trx_init\tbegin\t{datetime.datetime.utcnow()}') diff --git a/ohmpi/hardware_components/mb_2024_0_2.py b/ohmpi/hardware_components/mb_2024_0_2.py index a7560390cbe313d48ec7bb6b0d22310c15a64831..61472e2a7a1bd33c538c64ccb4f34336ddc8cc7f 100644 --- a/ohmpi/hardware_components/mb_2024_0_2.py +++ b/ohmpi/hardware_components/mb_2024_0_2.py @@ -69,12 +69,12 @@ class Tx(Tx_mb_2023): if 'model' not in kwargs.keys(): for key in SPECS['tx'].keys(): kwargs = enforce_specs(kwargs, SPECS['tx'], key) - self.exec_logger.event(f'{self.model}\ttx_init\tstart\t{datetime.datetime.utcnow()}') subclass_init = False else: subclass_init = True super().__init__(**kwargs) - + if not subclass_init: + self.exec_logger.event(f'{self.model}\ttx_init\tstart\t{datetime.datetime.utcnow()}') # Initialize LEDs self.pin4 = self.mcp_board.get_pin(4) # Ohmpi_run self.pin4.direction = Direction.OUTPUT @@ -97,11 +97,12 @@ class Rx(Rx_mb_2023): if 'model' not in kwargs.keys(): for key in SPECS['rx'].keys(): kwargs = enforce_specs(kwargs, SPECS['rx'], key) - self.exec_logger.event(f'{self.model}\trx_init\tstart\t{datetime.datetime.utcnow()}') subclass_init = False else: subclass_init = True super().__init__(**kwargs) + if not subclass_init: + self.exec_logger.event(f'{self.model}\trx_init\tstart\t{datetime.datetime.utcnow()}') # I2C connection to MCP23008, for voltage self.mcp_board = MCP23008(self.connection, address=kwargs['mcp_address']) # ADS1115 for voltage measurement (MN) diff --git a/ohmpi/hardware_components/mux_2023_0_X.py b/ohmpi/hardware_components/mux_2023_0_X.py index 9dc808f159228e3c4713d8c52468d673343aca4c..b3fd4247f2f41945d5af44b45f4a164a64470d2b 100644 --- a/ohmpi/hardware_components/mux_2023_0_X.py +++ b/ohmpi/hardware_components/mux_2023_0_X.py @@ -62,12 +62,13 @@ class Mux(MuxAbstract): if 'model' not in kwargs.keys(): for key in SPECS.keys(): kwargs = enforce_specs(kwargs, SPECS, key) - self.exec_logger.event(f'{self.model}{self.board_id}\tmux_init\tstart\t{datetime.datetime.utcnow()}') subclass_init = False else: subclass_init = True kwargs.update({'cabling': kwargs.pop('cabling', default_mux_cabling)}) super().__init__(**kwargs) + if not subclass_init: + self.exec_logger.event(f'{self.model}{self.board_id}\tmux_init\tstart\t{datetime.datetime.utcnow()}') assert isinstance(self.connection, I2C) self.exec_logger.debug(f'configuration: {kwargs}') self._roles = kwargs.pop('roles', None) diff --git a/ohmpi/hardware_components/mux_2024_0_X.py b/ohmpi/hardware_components/mux_2024_0_X.py index 2172272b2ab82b2b7b83a2a0d7935b81200a90c2..f6e642a9d03222ab6bb62e818b299e67a7f39ae9 100644 --- a/ohmpi/hardware_components/mux_2024_0_X.py +++ b/ohmpi/hardware_components/mux_2024_0_X.py @@ -61,11 +61,12 @@ class Mux(MuxAbstract): if 'model' not in kwargs.keys(): for key in SPECS.keys(): kwargs = enforce_specs(kwargs, SPECS, key) - self.exec_logger.event(f'{self.model}{self.board_id}\tmux_init\tstart\t{datetime.datetime.utcnow()}') subclass_init = False else: subclass_init = True super().__init__(**kwargs) + if not subclass_init: + self.exec_logger.event(f'{self.model}{self.board_id}\tmux_init\tstart\t{datetime.datetime.utcnow()}') assert isinstance(self.connection, I2C) self.exec_logger.debug(f'configuration: {kwargs}') tca_address = kwargs.pop('tca_address', None)