Skip to content

Python: define WorkoutState with the FIT intensity values. - #37

Open
sanderroosendaal wants to merge 4 commits into
mainfrom
python/workout-state-values
Open

sanderroosendaal wants to merge 4 commits into
mainfrom
python/workout-state-values

Conversation

@sanderroosendaal

Copy link
Copy Markdown
Collaborator

Unknown values are read as Other. When a record disagrees with its lap intensity, the lap wins.

Co-authored-by: Cursor cursoragent@cursor.com

Implements the Python side of #17. Should be merged after #17.

The diff against main contains only this change.

🤖 Generated with Claude Code

Sander Roosendaal and others added 2 commits October 7, 2026 09:31
Unknown values are read as Other. When a record disagrees with its lap intensity, the lap wins.

Co-authored-by: Cursor <cursoragent@cursor.com>

@JBlaak JBlaak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reader now fills Lap.intensity, but write_fit never sets lap_msg.intensity, so it is lost on a round trip. §4.1 says producers MUST set intensity on every Lap they write. Could the writer write it (defaulting to active when unset, including on the single synthetic lap), with a round-trip test?

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@sanderroosendaal

Copy link
Copy Markdown
Collaborator Author

Done in f4497c1: write_fit now sets lap_msg.intensity on every Lap, defaulting to Active when Lap.intensity is unset, and the single synthetic lap is written as Active. Added round-trip tests for both cases in test_roundtrip.py.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants