Solution for Bluetooth SIG hands-on training course
Dependencies: BLE_API mbed-dev-bin nRF51822-bluetooth-mdw
Fork of microbit-dal-bluetooth-mdw_starter by
Diff: source/bluetooth/MicroBitMagnetometerService.cpp
- Revision:
- 22:23d7b9a4b082
- Parent:
- 21:cab56b701601
- Child:
- 23:6055f6c19fa6
--- a/source/bluetooth/MicroBitMagnetometerService.cpp Wed Jul 13 12:17:53 2016 +0100 +++ b/source/bluetooth/MicroBitMagnetometerService.cpp Wed Jul 13 12:17:54 2016 +0100 @@ -74,7 +74,7 @@ magnetometerPeriodCharacteristicHandle = magnetometerPeriodCharacteristic.getValueHandle(); ble.gattServer().notify(magnetometerDataCharacteristicHandle,(uint8_t *)magnetometerDataCharacteristicBuffer, sizeof(magnetometerDataCharacteristicBuffer)); - ble.gattServer().notify(magnetometerBearingCharacteristicHandle,(uint8_t *)&magnetometerBearingCharacteristicBuffer, sizeof(magnetometerBearingCharacteristicBuffer)); + ble.gattServer().notify(magnetometerBearingCharacteristicHandle,(uint8_t *)&magnetometerBearingCharacteristicBuffer, sizeof(magnetometerDataCharacteristicBuffer)); ble.gattServer().write(magnetometerPeriodCharacteristicHandle, (const uint8_t *)&magnetometerPeriodCharacteristicBuffer, sizeof(magnetometerPeriodCharacteristicBuffer)); ble.onDataWritten(this, &MicroBitMagnetometerService::onDataWritten);