Odometry Pedometer using nRF51822 and ADXL345
Dependencies: ADXL345 BLE_API mbed nRF51822
Fork of BLE_CycleSpeedCadence by
Revision 74:98dee483c173, committed 2015-08-23
- Comitter:
- tenfoot
- Date:
- Sun Aug 23 14:05:22 2015 +0000
- Parent:
- 73:bae88c99c2ae
- Child:
- 75:7e334e81da21
- Commit message:
- Fix feature report
Changed in this revision
CyclingSpeedAndCadenceService.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/CyclingSpeedAndCadenceService.h Sun Aug 23 14:00:28 2015 +0000 +++ b/CyclingSpeedAndCadenceService.h Sun Aug 23 14:05:22 2015 +0000 @@ -28,10 +28,13 @@ */ class CyclingSpeedAndCadenceService { public: + static const uint8_t FLAG_WHEEL_PRESENT = (1 << 0); + static const uint8_t FLAG_CRANK_PRESENT = (1 << 1); + enum Mode { - MODE_SPEED, - MODE_CADENCE, - MODE_SPEED_CADENCE + MODE_SPEED = FLAG_WHEEL_PRESENT, + MODE_CADENCE = FLAG_CRANK_PRESENT, + MODE_SPEED_CADENCE = FLAG_WHEEL_PRESENT | FLAG_CRANK_PRESENT }; /** @@ -158,8 +161,6 @@ } protected: - static const uint8_t FLAG_WHEEL_PRESENT = (1 << 0); - static const uint8_t FLAG_CRANK_PRESENT = (1 << 1); static const uint16_t MAX_BYTES = (1 + 4 + 2 + 2 + 2); union SpeedCadenceValue {