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.
Dependencies: BLE_API mbed-dev-bin nRF51822
Fork of microbit-dal by
Diff: source/drivers/MicroBitCompass.cpp
- 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
