fix v2 realtime HR + wrist-off drop in decodeFrame, dedupe timestamp packing - #38
fix v2 realtime HR + wrist-off drop in decodeFrame, dedupe timestamp packing#38abdulsaheel wants to merge 1 commit into
Conversation
…imestamp packing, fix stale docs decodeFrame never routed rec_type==2 to parseRealtimeHrV2 so live v2 HR packets got misdecoded by the v1 parser (garbage RR, wrong wearing state). also R10 live decode only emitted realtime_hr when hr>0, so a legit off-wrist reading (hr==0) fell through to an unlabeled data_record and lost its wearing state. pulled the copy-pasted sec/subsec LE packing out of the 5 command builders into one _leTimestamp helper. README/CONTRIBUTING were pointing at stuff that doesn't exist in the repo (ts/ oracle, _external/noop, bWanShiTong path) and missing 4 real source files from the file list.
|
Warning Review limit reachedNext included review available in 29 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's GuideFixes frame-level realtime HR dispatch for v2 and R10—including legitimate off-wrist readings—while deduplicating timestamp serialization in command builders and correcting repository documentation to match the current codebase. Flow diagram for realtime HR frame decodingflowchart TD
A[decodeFrame receives data_record] --> B{Compact packet?}
B -- Yes --> C{rec_type == 2?}
C -- Yes --> D[parseRealtimeHrV2]
D --> E[realtime_hr with wearing state]
C -- No --> F[parseRealtimeHr]
F --> G[realtime_hr]
B -- No --> H{rec_type == Record.r10?}
H -- Yes --> I[parseR10Lite]
I --> J[realtime_hr with wearing = hr > 0]
H -- No --> K[data_record]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
squashed into #42 for one clean review — closing this round. |
couple of decode bugs found in an audit pass:
tests + analyze pass.
Summary by Sourcery
Correct realtime heart-rate decoding and centralize timestamp encoding while aligning repository documentation with the current project layout.
Bug Fixes:
Enhancements:
Documentation: