feat(edge): send per-slot vitals instead of discarding them at the wire - #1817
Open
clonea1 wants to merge 1 commit into
Open
feat(edge): send per-slot vitals instead of discarding them at the wire#1817clonea1 wants to merge 1 commit into
clonea1 wants to merge 1 commit into
Conversation
update_multi_person_vitals() already computes a heart and breathing estimate per occupancy slot, and every one of them is thrown away before transmission. Only the aggregate packet reaches the sink, carrying a slot COUNT with no way to see what that count was counting. The consequence is that a host cannot distinguish "two people, both breathing steadily" from "one person and a noisy slot that should never have been asserted". The count alone gives no means to audit itself, so a wrong count is indistinguishable from a right one. This adds a 32-byte packet (EDGE_VITALS_SLOTS_MAGIC = 0xC5110009) carrying the per-slot values, sent ALONGSIDE and never instead of the aggregate packet, so existing sinks are unaffected and older firmware stays parseable. A sink that does not know the magic ignores it, as with the other auxiliary packet types. Size is asserted at compile time (_Static_assert on 32 bytes) because the packet family shares a fixed-size wire contract and a silent struct-padding change would corrupt every field after the first. Co-Authored-By: claude-flow <ruv@ruv.net>
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.
update_multi_person_vitals() already computes a heart and breathing estimate
per occupancy slot, and every one of them is thrown away before transmission.
Only the aggregate packet reaches the sink, carrying a slot COUNT with no way
to see what that count was counting.
The consequence is that a host cannot distinguish "two people, both breathing
steadily" from "one person and a noisy slot that should never have been
asserted". The count alone gives no means to audit itself, so a wrong count is
indistinguishable from a right one.
This adds a 32-byte packet (EDGE_VITALS_SLOTS_MAGIC = 0xC5110009) carrying the
per-slot values, sent ALONGSIDE and never instead of the aggregate packet, so
existing sinks are unaffected and older firmware stays parseable. A sink that
does not know the magic ignores it, as with the other auxiliary packet types.
Size is asserted at compile time (_Static_assert on 32 bytes) because the
packet family shares a fixed-size wire contract and a silent struct-padding
change would corrupt every field after the first.
Rebased onto current
mainbefore opening: staged before today's seven merges, so it needed replaying to avoid reading as a revert of them. Clean rebase, no files deleted.