Add Target Setting Flags and MachineFeature.getTargetSettingFlags.#25
Open
arcanapower wants to merge 1 commit intoMalte2036:mainfrom
Open
Add Target Setting Flags and MachineFeature.getTargetSettingFlags.#25arcanapower wants to merge 1 commit intoMalte2036:mainfrom
arcanapower wants to merge 1 commit intoMalte2036:mainfrom
Conversation
…sted on treadmill machine.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for Target Setting Flags to the FTMS (Fitness Machine Service) library, enabling the determination of which machine features are writable versus read-only. The implementation introduces a new TargetSettingFlag class with 17 flag definitions and a method to extract these flags from the second 32-bit segment of the machine feature data.
- Adds TargetSettingFlag class with 17 target setting flags for various fitness machine parameters
- Implements getTargetSettingFlags() method in MachineFeature to parse target setting flags from bytes 4-7 of the data
- Exports TargetSettingFlag class in the public API
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| lib/src/ftms/characteristic/machine/feature/target_setting_flag.dart | Defines 17 target setting flags representing writable machine features (speed, power, resistance, etc.) |
| lib/src/ftms/characteristic/machine/feature/machine_feature.dart | Adds allTargetSettingFlags getter and getTargetSettingFlags() method to parse flags from the second 4-byte segment |
| lib/flutter_ftms.dart | Exports TargetSettingFlag class to make it available in the public API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
Hey @arcanapower, can you add a test to |
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.
Some machine features are read only, use target setting flags to check if they are writable.