Skip to content

feat(feed): list every transport each drone was heard on - #5

Open
wnagele wants to merge 1 commit into
ifnull:mainfrom
wnagele:rid-sources
Open

feat(feed): list every transport each drone was heard on#5
wnagele wants to merge 1 commit into
ifnull:mainfrom
wnagele:rid-sources

Conversation

@wnagele

@wnagele wnagele commented Aug 28, 2026

Copy link
Copy Markdown

What

Drone rows in the JSON feed gain an additive rid_sources array listing every transport the drone has been heard on since it entered the tracker, most-recent-first — e.g. ["wifi_beacon", "ble"], or ["wifi_beacon", "ble5", "ble"] once #4 lands. Element 0 always matches the current rid_source; values mirror rid_source. The dashboard Source column renders the full list — current transport at full intensity, previously-heard transports dimmed. The array resets when the drone TTL-evicts and reappears, same as message_count. No schema_version bump.

Why

rid_source is most-recent-wins: with a drone heard on several transports — most transmitters broadcast BLE and Wi-Fi Beacon simultaneously — only the latest one is visible, and there is no way to tell "currently on Wi-Fi Beacon, previously heard on BLE" from the row alone. The granular BLE value from #4 (ble5) makes the field flip even within a single transport family. The array preserves the full history: consumers and operators see which radios are alive and which transports a given drone actually uses, at a glance.

How

  • tracker.py: DroneState gains a sources list; _touch_sources() deduplicates and moves the just-heard transport to the front on every update_* call; snapshot() exposes it as the additive rid_sources array. TTL eviction resets it naturally.
  • feed_server.py: the dashboard Source column renders through a new transportCell() — element 0 at full intensity, the rest dimmed (.src-old) — falling back to plain rid_source for feeds predating the field.
  • FEED.md documents the row; CHANGELOG entry under Added.

Composes with #4: merging that branch into this one verifies cleanly — a drone heard on ble, ble5 and wifi_beacon reports rid_sources: ["wifi_beacon", "ble5", "ble"].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant