Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 {