@@ -12,7 +12,7 @@ struct FitnessMachineIndoorBikeDataFlags {
12
12
enum Types : uint16_t {
13
13
MoreDataBit = 1U << 0 ,
14
14
AverageSpeedPresent = 1U << 1 ,
15
- InstantaneousCadencePresent = 1U << 2 ,
15
+ InstantaneousCadencePresent = 1U << 2 ,
16
16
AverageCadencePresent = 1U << 3 ,
17
17
TotalDistancePresent = 1U << 4 ,
18
18
ResistanceLevelPresent = 1U << 5 ,
@@ -191,6 +191,27 @@ struct FtmsStatus {
191
191
int length;
192
192
};
193
193
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
+
194
215
class CyclingPowerMeasurement {
195
216
public:
196
217
// Flags definition as per specification
@@ -256,6 +277,21 @@ class CyclingPowerMeasurement {
256
277
}
257
278
};
258
279
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
+
259
295
class CscMeasurement {
260
296
public:
261
297
// Flags definition as per specification
@@ -305,4 +341,4 @@ class CscMeasurement {
305
341
306
342
return data;
307
343
}
308
- };
344
+ };
0 commit comments