add UBX-MON-VER support and surface device identification in CLI/GUI
Add the Ver message parser and a fixed UbxQuery (was unused and had a broken semaphore/state bug) to poll MON-VER once on connect. The CLI prints hw/sw version and extensions; the GUI polls it per receiver, pre-fills the read-only ID field with a connection counter and rewrites it from the MOD= extension once the device answers, and propagates the resolved display name to the Sky and Plot tabs so they no longer show the stale placeholder ID. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XM4FNUjhu9x8df5Dp1hHvd
This commit is contained in:
+11
-1
@@ -316,6 +316,7 @@ class SinglePlotWidget(QWidget):
|
||||
model.receiver_removed.connect(self._on_receiver_removed)
|
||||
model.satellite_update.connect(self._on_sat_update)
|
||||
model.pdop_update.connect(self._on_pdop_update)
|
||||
model.version_update.connect(self._on_version_update)
|
||||
|
||||
# ── UI ────────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -425,7 +426,7 @@ class SinglePlotWidget(QWidget):
|
||||
for rid in selected:
|
||||
ts_dq, v_dq = self._data.get(rid, ([], []))
|
||||
if ts_dq:
|
||||
snapshot[rid] = (list(ts_dq), list(v_dq))
|
||||
snapshot[self._model.display_name(rid)] = (list(ts_dq), list(v_dq))
|
||||
w, h = self._canvas.width(), self._canvas.height()
|
||||
if w > 0 and h > 0:
|
||||
self._thread.submit(snapshot, self._y_cb.currentText(), w, h)
|
||||
@@ -485,6 +486,15 @@ class SinglePlotWidget(QWidget):
|
||||
self._rebuild_val_combo()
|
||||
self._submit_render()
|
||||
|
||||
def _on_version_update(self, rid: str, device_id: str, sw_version: str):
|
||||
label = self._model.display_name(rid)
|
||||
for i in range(self._src_list.count()):
|
||||
item = self._src_list.item(i)
|
||||
if item.data(Qt.UserRole) == rid:
|
||||
item.setText(f" {label} ")
|
||||
break
|
||||
self._submit_render()
|
||||
|
||||
def _on_sat_update(self, rid: str, sats: list):
|
||||
selected = set(self._selected_rids())
|
||||
if rid not in selected:
|
||||
|
||||
Reference in New Issue
Block a user