Add Legacy Stationary Bike#124
Conversation
- Introduce StationaryBikeData and StationaryBike enum values - Implement StationaryBike class with cadence and power parsing - Update factory methods to instantiate StationaryBike as needed - Move lap toggle logic to HandleFEState for consistency
- Add unit tests for StationaryBike covering parsing, invalid values, and ToString(). - Update XML docs to clarify invalid cadence/power values. - Call HandleFEState in StationaryBike and Treadmill Parse methods. - Expand FitnessEquipmentTests to cover StationaryBike and LapToggled event for all equipment types.
- Bump version to 6.1.0 and update release notes/docs - Add Legacy Stationary Bike device profile to Fitness Equipment - Refactor: HandleFEState now handles lap toggle - Fix: Treadmill correctly handles fitness equipment state - Update NuGet dependencies - Improve XML docs for StationaryBike and TrainerStationaryBike
There was a problem hiding this comment.
Code Review
This pull request introduces the Legacy Stationary Bike device profile to the Fitness Equipment category, including its parsing logic and associated unit tests. It also refactors the FitnessEquipment base class to centralize lap toggle handling within HandleFEState and fixes an issue where the treadmill profile was not correctly processing equipment state. Feedback focuses on correctly parsing the 12-bit instantaneous power value for stationary bikes, updating documentation for invalid power constants, ensuring the handledPage flag is correctly set after parsing, and improving unit test robustness by using literal values instead of Moq matchers in constructors.
|
Thanks Stephen, it looks good to me, I'll test it out on the weekend and let you know if anything looks up |
PR Classification
New feature and refactor: Adds support for the ANT+ Legacy Stationary Bike device profile, refactors lap toggle handling, and fixes treadmill state handling.
PR Summary
This PR introduces the StationaryBike device profile to the Fitness Equipment category, refactors lap toggle event handling for consistency, and fixes treadmill state management. It also adds targeted unit tests and updates documentation and dependencies.
Closes #121.