feat(feed): list every transport each drone was heard on - #5
Open
wnagele wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Drone rows in the JSON feed gain an additive
rid_sourcesarray 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 currentrid_source; values mirrorrid_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 asmessage_count. Noschema_versionbump.Why
rid_sourceis 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:DroneStategains asourceslist;_touch_sources()deduplicates and moves the just-heard transport to the front on everyupdate_*call;snapshot()exposes it as the additiverid_sourcesarray. TTL eviction resets it naturally.feed_server.py: the dashboard Source column renders through a newtransportCell()— element 0 at full intensity, the rest dimmed (.src-old) — falling back to plainrid_sourcefor feeds predating the field.Composes with #4: merging that branch into this one verifies cleanly — a drone heard on
ble,ble5andwifi_beaconreportsrid_sources: ["wifi_beacon", "ble5", "ble"].