My fork

Dependencies:   BLE_API mbed-dev-bin nRF51822-bluetooth-mdw

Fork of microbit-dal-bluetooth-mdw by Martin Woolley

Revision:
30:db87179335d5
Parent:
1:8aa5cdb4ab67
Child:
31:87789e55bac7
diff -r 62f8b007debf -r db87179335d5 source/drivers/MicroBitCompass.cpp
--- a/source/drivers/MicroBitCompass.cpp	Wed Jul 13 12:18:07 2016 +0100
+++ b/source/drivers/MicroBitCompass.cpp	Wed Jul 13 12:18:08 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;
@@ -775,4 +775,4 @@
     {3200000,    0xd0},        // 0.31 hz
     {6400000,    0xf0},        // 0.16 hz
     {12800000,   0xf8}         // 0.08 hz
-};
+};
\ No newline at end of file