feat: coordinate persistent detector collections - #111
Merged
Conversation
DonLakeFlyer
force-pushed
the
persistent-detector-collection
branch
from
September 4, 2026 20:17
4d3dc86 to
8d6ee71
Compare
DonLakeFlyer
force-pushed
the
persistent-detector-collection
branch
from
September 4, 2026 20:35
8d6ee71 to
c8282fa
Compare
DonLakeFlyer
force-pushed
the
persistent-detector-collection
branch
from
September 4, 2026 20:49
c8282fa to
5c2b015
Compare
Adopt the persistent-collection tunnel protocol (TagTrackerTunnelProtocol f31024e7) for Python-mode rotations. Protocol - Replace START/STOP_ROTATION_DETECTION with START_COLLECTION, START_COLLECTION_SLICE and FINISH_COLLECTION keyed by a per-rotation collection_id - Handle COLLECTION_STATUS and gate slice completion on it instead of counting detector pulses - Drop pulses and bearing results whose collection_id does not match the active rotation - Track the controller protocol_version from its heartbeat; expose protocolCompatible/controllerProtocolVersion to QML and refuse to send tunnel commands until a compatible heartbeat has been seen State machine - SendTunnelCommandState takes an ackTimeoutMs parameter; StartCollection uses 35 s because the controller blocks up to 30 s waiting for detectors before acking (DonLakeFlyer/MavlinkTagController2#118) - FinishCollection uses 20 s because the controller tears down detector processes (up to 15 s) before acking - Stop handler sends FINISH_COLLECTION cancel for the active collection - PythonRotateAndCaptureState listens for collection-wide FAILED status for its whole lifetime; slice failures between headings are no longer lost - Last COLLECTION_STATUS for the active collection is cached so a slice wait state that connects after SLICE_COMPLETE arrived still sees it - Drop dead channelizer heartbeat handling; the controller is the only sender - rotationInProgress is set before a rotation/auto-detection machine starts and cleared when it finishes or stops; both the C++ entry points and the QML action use it so a second start during async setup is rejected - Stop handler always runs local cleanup even when the cancel cannot be sent - Python-mode rotation/auto-detection is rejected while manual detection is running; the controller only accepts START_COLLECTION from HAS_TAGS - Drop collection-tagged pulses that do not match the active collection even when no rotation is active - Distinguish lost heartbeat from version mismatch in the send-gate error Build - Bump TunnelProtocol CPM pin to f31024e7
DonLakeFlyer
force-pushed
the
persistent-detector-collection
branch
from
September 4, 2026 21:08
5c2b015 to
6ce1a49
Compare
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.
Adopts the persistent-collection tunnel protocol (TagTrackerTunnelProtocol f31024e7) for Python-mode rotations. The uavrt (C++ detector) path is unaffected except for the protocol-version gate noted below.
Protocol
START/STOP_ROTATION_DETECTIONwithSTART_COLLECTION,START_COLLECTION_SLICEandFINISH_COLLECTION, keyed by a per-rotationcollection_idCOLLECTION_STATUSand gate slice completion on it instead of counting detector pulsescollection_iddoes not match the active rotationprotocol_versionfrom its heartbeat; exposeprotocolCompatible/controllerProtocolVersionto QMLBehaviour change affecting both detection modes
SendTunnelCommandStatenow refuses to send any tunnel command until a compatible controller heartbeat has been received (and errors the state machine with a clear message otherwise). A controller withoutprotocol_versionin its heartbeat, or with a different version, is unusable with this build by design.State machine
SendTunnelCommandStatetakes anackTimeoutMsparameter (default 2 s).StartCollectionpasses 35 s because the controller blocks up to 30 s waiting for detectors before acking — tracked in START_COLLECTION blocks up to 30 s before ACK; report detector startup progress to QGC instead MavlinkTagController2#118, which proposes async progress reporting insteadFINISH_COLLECTIONcancel for the active collectionBuild
TunnelProtocolCPM pin bumped tof31024e7Notes
custom/(baselineCustomPlugin.cchas 364 clang-format diffs; all 3 null-check hits are on untouched lines). Not reformatting unrelated code here.custom/has no C++ unit-test infrastructure yet.