Repository navigation
garmin: echo time request reference id - #76
Conversation
There was a problem hiding this comment.
Sorry @abdulsaheel, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 6 days and 2 hours by commenting @sourcery-ai review. Upgrade to get a review now.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 27 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
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 GuideThe PR changes Garmin 5052 time responses to require the original request frame, echo its little-endian reference ID for watch-side correlation, and abstain when the ID is unavailable; tests cover both successful correlation and malformed requests. Sequence diagram for Garmin time request correlationsequenceDiagram
participant Watch
participant Adapter
participant Garmin
Watch->>Adapter: CURRENT_TIME_REQUEST (5052)
Adapter->>Garmin: garminBuildTimeResponse(request, nowUnixSeconds, utcOffsetSeconds)
Garmin->>Garmin: Read request.payload reference_id
Garmin-->>Adapter: RESPONSE (5000) with echoed reference_id
Adapter-->>Watch: Time response
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
the 5052 time answer always sent reference_id 0. it now reads the u32 id from the request payload and echoes it, so the watch can match the answer to what it asked.
garminBuildTimeResponse takes the request frame now and returns null if there's no id to echo. edge's garmin adapter needs to pass the frame through when it repins.
Summary by Sourcery
Echo Garmin time request reference IDs in responses and reject requests that cannot provide one.
New Features:
Bug Fixes:
Tests: