fork microbit-dal
Dependencies: BLE_API mbed-dev-bin nRF51822
Fork of microbit-dal by
Diff: source/bluetooth/MicroBitMagnetometerService.cpp
- Revision:
- 22:23d7b9a4b082
- Parent:
- 21:cab56b701601
- Child:
- 23:6055f6c19fa6
diff -r cab56b701601 -r 23d7b9a4b082 source/bluetooth/MicroBitMagnetometerService.cpp --- 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);