Repository navigation
Workout detail in two tabs; jring workouts stream heart rate the whole session - #86
Merged
Merged
Conversation
…e session A 46-minute gym session read 76/97 bpm against a watch's 116/149. The jring workout started the vendor's 180-second spot check (14 b4…), so only the warm-up streamed. The vendor's run screen sends duration 0 and the sport mode when 0x20 bit 56 is set (RunRecordActivity, setHeartRateMode); do the same, and stop in the same mode. SpO2 is no longer polled while a workout stream runs. The summary now weights heart rate by time (WorkoutHeart), so a 1 Hz stream can't outvote the ring's log, and adds active/resting calories and a training load estimate (Banister TRIMP). The workout screen becomes two tabs: Summary (total kcal, active and resting, duration, average HR, training load) and Heart rate (curve with average, maximum, minutes per zone). Audit in audits/2026-11-16-workout-detail-tabs.md. Claude-Session: https://claude.ai/code/session_01P1t1aUqSUPd3whKXmgVm7w
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.
Why
The owner compared one gym session (12 Nov) with a Huawei watch:
Cause (from the vendor app, JRing 2.0.8 decompiled locally)
0x14is the vendor'ssetHeartRateMode(on, seconds, mode): bytes 1–4 are a duration in seconds, little-endian, and byte 5 is a sport mode. PulseLoop started workouts with14 b4…. That is 180 seconds, the vendor's spot check (FragmentMain.startTestHeart). So each workout streamed only its warm-up. The vendor's run screen (RunRecordActivity.startHeartrateMode) instead sends duration 0 (until stopped) and the sport mode, when the ring's0x20reply sets bit 56 (FUNCTION_SPORT_FROM_APP). The owner's ring sets it. Notes are indocs/jring-56ff-plan.mdand AGENTS.md; the decompile stays out of git.Changes
JringSyncEnginestarts and stops workout heart rate in the vendor's sport mode.0x20reply after a mid-workout reconnect moves the stream across.WorkoutHeartweights heart rate by time. Each reading stands for at most 2 minutes, so a 1 Hz stream can't outvote the ring's log.JringWorkoutHeartRateTest,WorkoutHeartTest. pt-BR for every new string.Checks
mainin this container:MealJournalTest×2 (timezone) andResponsesHttpTest(DNS proxy).audits/2026-11-16-workout-detail-tabs.md.Generated by Claude Code