Commit a054703c authored by Arnaud WATLET's avatar Arnaud WATLET
Browse files

Configure pwr in hardware_system init

Showing with 3 additions and 2 deletions
+3 -2
...@@ -122,8 +122,6 @@ class OhmPiHardware: ...@@ -122,8 +122,6 @@ class OhmPiHardware:
self.tx = kwargs.pop('tx', tx_module.Tx(**HARDWARE_CONFIG['tx'])) self.tx = kwargs.pop('tx', tx_module.Tx(**HARDWARE_CONFIG['tx']))
if isinstance(self.tx, dict): if isinstance(self.tx, dict):
self.tx = tx_module.Tx(**self.tx) self.tx = tx_module.Tx(**self.tx)
self.tx.pwr = self.pwr
self.tx.pwr._current_max = self.current_max
# Initialize power source # Initialize power source
HARDWARE_CONFIG['pwr'].pop('model') HARDWARE_CONFIG['pwr'].pop('model')
...@@ -147,6 +145,9 @@ class OhmPiHardware: ...@@ -147,6 +145,9 @@ class OhmPiHardware:
self.pwr = kwargs.pop('pwr', pwr_module.Pwr(**HARDWARE_CONFIG['pwr'])) self.pwr = kwargs.pop('pwr', pwr_module.Pwr(**HARDWARE_CONFIG['pwr']))
self.pwr_state = 'off' self.pwr_state = 'off'
self.tx.pwr = self.pwr
self.tx.pwr._current_max = self.current_max
# Initialize Muxes # Initialize Muxes
self._cabling = kwargs.pop('cabling', {}) self._cabling = kwargs.pop('cabling', {})
self.mux_boards = {} self.mux_boards = {}
......
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