waveform: simplify process_ddb

This commit is contained in:
Simon Renblad 2024-01-15 17:30:33 +08:00
parent 780e0bada8
commit 4c9b0f1159

View File

@ -852,13 +852,12 @@ class WaveformDock(QtWidgets.QDockWidget):
channel_list = comm_analyzer.get_channel_list(self._ddb) channel_list = comm_analyzer.get_channel_list(self._ddb)
self._channel_model.clear() self._channel_model.clear()
self._channel_model.update(channel_list) self._channel_model.update(channel_list)
for name, desc in self._ddb.items(): desc = self._ddb.get("core_analyzer")
if name == "core_analyzer": if desc is not None:
logger.info("coreanalyzer exists") logger.info("desc found")
addr = desc["host"] addr = desc["host"]
port = desc.get("port_proxy", 1385) port = desc.get("port_proxy", 1385)
port_control = desc.get("port_proxy_control", 1386) port_control = desc.get("port_proxy_control", 1386)
if addr is not None:
self.proxy_client.update_address(addr, port, port_control) self.proxy_client.update_address(addr, port, port_control)
def init_ddb(self, ddb): def init_ddb(self, ddb):