Commit cd4bcfc6 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Tries to fix "dict object has no attr pwr" error

Showing with 4 additions and 6 deletions
+4 -6
...@@ -58,8 +58,6 @@ class Mux(MuxAbstract): ...@@ -58,8 +58,6 @@ class Mux(MuxAbstract):
if 'cabling' not in kwargs.keys() or kwargs['cabling']=={}: if 'cabling' not in kwargs.keys() or kwargs['cabling']=={}:
kwargs.update({'cabling': default_mux_cabling}) kwargs.update({'cabling': default_mux_cabling})
super().__init__(**kwargs) super().__init__(**kwargs)
if isinstance(self.ctl, dict):
self.ctl = None # TODO: How to pass controller to mux board
self.exec_logger.debug(f'configuration: {MUX_CONFIG}') self.exec_logger.debug(f'configuration: {MUX_CONFIG}')
tca_address = kwargs.pop('tca_address', None) tca_address = kwargs.pop('tca_address', None)
tca_channel = kwargs.pop('tca_channel', 0) tca_channel = kwargs.pop('tca_channel', 0)
......
...@@ -84,8 +84,8 @@ class Tx(TxAbstract): ...@@ -84,8 +84,8 @@ class Tx(TxAbstract):
self.current_adjustable = False self.current_adjustable = False
if self.ctl is None: if self.ctl is None:
self.ctl = ctl_module.Ctl() self.ctl = ctl_module.Ctl()
elif isinstance(self.ctl, dict): # elif isinstance(self.ctl, dict):
self.ctl = ctl_module.Ctl(**self.ctl) # self.ctl = ctl_module.Ctl(**self.ctl)
# I2C connexion to MCP23008, for current injection # I2C connexion to MCP23008, for current injection
self.mcp_board = MCP23008(self.ctl.bus, address=TX_CONFIG['mcp_board_address']) self.mcp_board = MCP23008(self.ctl.bus, address=TX_CONFIG['mcp_board_address'])
...@@ -207,8 +207,8 @@ class Rx(RxAbstract): ...@@ -207,8 +207,8 @@ class Rx(RxAbstract):
super().__init__(**kwargs) super().__init__(**kwargs)
if self.ctl is None: if self.ctl is None:
self.ctl = ctl_module.Ctl() self.ctl = ctl_module.Ctl()
elif isinstance(self.ctl, dict): # elif isinstance(self.ctl, dict):
self.ctl = ctl_module.Ctl(**self.ctl) # self.ctl = ctl_module.Ctl(**self.ctl)
# print(f'ctl: {self.ctl}, {type(self.ctl)}') # TODO: delete me! # print(f'ctl: {self.ctl}, {type(self.ctl)}') # TODO: delete me!
# ADS1115 for voltage measurement (MN) # ADS1115 for voltage measurement (MN)
self._ads_voltage_address = 0x49 self._ads_voltage_address = 0x49
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment