diff --git a/ohmpi/hardware_components/mux_2024_0_X.py b/ohmpi/hardware_components/mux_2024_0_X.py index a865b3721b05921f86f516603f5f6d6af9ef3442..49c528a19e38c54c56733da2ffa476d46051429f 100644 --- a/ohmpi/hardware_components/mux_2024_0_X.py +++ b/ohmpi/hardware_components/mux_2024_0_X.py @@ -100,7 +100,7 @@ class Mux(MuxAbstract): self.exec_logger.debug(f'MCP addresses nor jumper positions for {self.board_id} not in config file...') # TODO: if no addresses defined, should abort or should we set default mcp addresses? for addr in self._mcp_addresses: - assert addr in [0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27] + assert addr in ['0x20', '0x21', '0x22', '0x23', '0x24', '0x25', '0x26', '0x27'] self._mcp = [None, None] self.reset() @@ -142,6 +142,6 @@ class Mux(MuxAbstract): def _mcp_jumper_pos_to_addr(self): d = {'up': 0, 'down': 1} - mcp_0 = int(f"0100{d[self._mcp_jumper_pos['addr2']]}{d[self._mcp_jumper_pos['addr1']]}0", 2) - mcp_1 = int(f"0100{d[self._mcp_jumper_pos['addr2']]}{d[self._mcp_jumper_pos['addr1']]}1", 2) + mcp_0 = hex(int(f"0100{d[self._mcp_jumper_pos['addr2']]}{d[self._mcp_jumper_pos['addr1']]}0", 2)) + mcp_1 = hex(int(f"0100{d[self._mcp_jumper_pos['addr2']]}{d[self._mcp_jumper_pos['addr1']]}1", 2)) self._mcp_addresses = (mcp_0, mcp_1) \ No newline at end of file