sen data via radio to other microbits accept command via radio bufixes
Dependencies: BLE_API nRF51822 mbed-dev-bin
Diff: source/drivers/MicroBitCompass.cpp
- Revision:
- 32:ece16b5987dd
- Parent:
- 31:87789e55bac7
- Child:
- 35:8ce23bc1af38
diff -r 87789e55bac7 -r ece16b5987dd source/drivers/MicroBitCompass.cpp --- a/source/drivers/MicroBitCompass.cpp Wed Jul 13 12:18:10 2016 +0100 +++ b/source/drivers/MicroBitCompass.cpp Wed Jul 13 12:18:11 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;