x
Dependencies: BLE_API mbed-dev-bin nRF51822
Fork of microbit-dal by
Diff: source/drivers/MicroBitCompass.cpp
- Revision:
- 37:b624ae5e94a5
- Parent:
- 35:8ce23bc1af38
- Child:
- 41:da05ec75cd5d
--- a/source/drivers/MicroBitCompass.cpp Wed Jul 13 12:18:15 2016 +0100 +++ b/source/drivers/MicroBitCompass.cpp Wed Jul 13 12:18:16 2016 +0100 @@ -703,7 +703,7 @@ void MicroBitCompass::setCalibration(CompassSample calibration) { if(this->storage != NULL) - this->storage->put(ManagedString("compassCal"), (uint8_t *)&calibration); + this->storage->put(ManagedString("compassCal"), (uint8_t *)&calibration, sizeof(CompassSample)); average = calibration; status |= MICROBIT_COMPASS_STATUS_CALIBRATED;