Lightly modified version of the BLE stack, that doesn't bring up a DFUService by default... as we have our own.
Fork of BLE_API by
Diff: services/HealthThermometerService.h
- Revision:
- 243:98f930d14515
- Parent:
- 242:0e9201b67e2f
- Child:
- 277:1407d2f1ce3c
--- a/services/HealthThermometerService.h Tue Dec 09 08:18:11 2014 +0000 +++ b/services/HealthThermometerService.h Tue Dec 09 13:15:19 2014 +0000 @@ -32,7 +32,7 @@ * @enum Sensor Location * @brief Location of sensor on the body */ - enum { + enum SensorLocation_t { LOCATION_ARMPIT = 1, /*!< armpit */ LOCATION_BODY, /*!< body */ LOCATION_EAR, /*!< ear */ @@ -80,6 +80,15 @@ } } + /** + * @brief Update the location. + * @param loc + * new location value. + */ + void updateLocation(SensorLocation_t loc) { + ble.updateCharacteristicValue(tempLocation.getValueHandle(), reinterpret_cast<uint8_t *>(&loc), sizeof(uint8_t)); + } + private: /* Private internal representation for the bytes used to work with the vaulue of the heart-rate characteristic. */ struct TemperatureValueBytes {