@@ -12,7 +12,7 @@ struct FitnessMachineIndoorBikeDataFlags {
1212 enum Types : uint16_t {
1313 MoreDataBit = 1U << 0 ,
1414 AverageSpeedPresent = 1U << 1 ,
15- InstantaneousCadencePresent = 1U << 2 ,
15+ InstantaneousCadencePresent = 1U << 2 ,
1616 AverageCadencePresent = 1U << 3 ,
1717 TotalDistancePresent = 1U << 4 ,
1818 ResistanceLevelPresent = 1U << 5 ,
@@ -191,6 +191,27 @@ struct FtmsStatus {
191191 int length;
192192};
193193
194+ // https://www.bluetooth.com/specifications/specs/cpp-1-1-html/
195+ // See "4.4. Cycling Power Feature"
196+ struct CyclingPowerFeatureFlags {
197+ enum Types : uint32_t {
198+ PedalPowerBalanceSupported = 1U << 0 ,
199+ AccumulatedTorqueSupported = 1U << 1 ,
200+ WheelRevolutionDataSupported = 1U << 2 ,
201+ CrankRevolutionDataSupported = 1U << 3 ,
202+ ExtremeMagnitudesSupported = 1U << 4 ,
203+ ExtremesAnglesSupported = 1U << 5 ,
204+ TopBottomDeadSpotAnglesSupported = 1U << 6 ,
205+ AccumulatedEnergySupported = 1U << 7 ,
206+ ExtremeTorquesSupported = 1U << 8 ,
207+ OffsetCompensationIndicatorSupported = 1U << 9 ,
208+ };
209+ };
210+
211+ inline CyclingPowerFeatureFlags::Types operator |(CyclingPowerFeatureFlags::Types a, CyclingPowerFeatureFlags::Types b) {
212+ return static_cast <CyclingPowerFeatureFlags::Types>(static_cast <int >(a) | static_cast <int >(b));
213+ }
214+
194215class CyclingPowerMeasurement {
195216 public:
196217 // Flags definition as per specification
@@ -256,6 +277,21 @@ class CyclingPowerMeasurement {
256277 }
257278};
258279
280+ // https://www.bluetooth.com/specifications/specs/cscs-1-0/
281+ // See "3.2. CSC Feature"
282+ struct CyclingSpeedCadenceFeatureFlags {
283+ enum Types : uint16_t {
284+ WheelRevolutionDataSupported = 1U << 0 ,
285+ CrankRevolutionDataSupported = 1U << 1 ,
286+ MultipleSensorLocationsSupported = 1U << 2
287+ // 3-15: Reserved for Future Use
288+ };
289+ };
290+
291+ inline CyclingSpeedCadenceFeatureFlags::Types operator |(CyclingSpeedCadenceFeatureFlags::Types a, CyclingSpeedCadenceFeatureFlags::Types b) {
292+ return static_cast <CyclingSpeedCadenceFeatureFlags::Types>(static_cast <int >(a) | static_cast <int >(b));
293+ }
294+
259295class CscMeasurement {
260296 public:
261297 // Flags definition as per specification
@@ -305,4 +341,4 @@ class CscMeasurement {
305341
306342 return data;
307343 }
308- };
344+ };
0 commit comments