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.
Diff: ble/services/HealthThermometerService.h
- Revision:
- 728:997ba5e7b3b6
- Parent:
- 727:1a1f5c5aedfe
- Child:
- 852:f0de1349300c
diff -r 1a1f5c5aedfe -r 997ba5e7b3b6 ble/services/HealthThermometerService.h
--- a/ble/services/HealthThermometerService.h Mon Jul 06 10:10:34 2015 +0100
+++ b/ble/services/HealthThermometerService.h Mon Jul 06 10:10:34 2015 +0100
@@ -73,7 +73,7 @@
void updateTemperature(float temperature) {
if (ble.getGapState().connected) {
valueBytes.updateTemperature(temperature);
- ble.updateCharacteristicValue(tempMeasurement.getValueAttribute().getHandle(), valueBytes.getPointer(), sizeof(TemperatureValueBytes));
+ ble.gattServer().write(tempMeasurement.getValueHandle(), valueBytes.getPointer(), sizeof(TemperatureValueBytes));
}
}
@@ -83,7 +83,7 @@
* new location value.
*/
void updateLocation(SensorLocation_t loc) {
- ble.updateCharacteristicValue(tempLocation.getValueHandle(), reinterpret_cast<uint8_t *>(&loc), sizeof(uint8_t));
+ ble.gattServer().write(tempLocation.getValueHandle(), reinterpret_cast<uint8_t *>(&loc), sizeof(uint8_t));
}
private:
@@ -140,7 +140,7 @@
uint8_t bytes[SIZEOF_VALUE_BYTES];
};
-private:
+protected:
BLE &ble;
TemperatureValueBytes valueBytes;
ReadOnlyGattCharacteristic<TemperatureValueBytes> tempMeasurement;