microbit: fix for #74

Replaced newer struct-style initialisation of CompassSample in MicroBit.cpp
with the more traditional constructor-style initialisation, to enfore
C98 compliance.

Closes #74
This commit is contained in:
James Devine 2016-01-13 15:12:13 +00:00
parent 7b7998e4eb
commit a209857007

View file

@ -250,7 +250,7 @@ void MicroBit::compassCalibrator(MicroBitEvent)
// The result contains the approximate zero point of each axis, but doubled.
// Halve each sample, and record this as the compass calibration data.
CompassSample cal = {(int)(Beta.get(0,0) / 2), (int)(Beta.get(1,0) / 2), (int)(Beta.get(2,0) / 2)};
CompassSample cal ((int)(Beta.get(0,0) / 2), (int)(Beta.get(1,0) / 2), (int)(Beta.get(2,0) / 2));
compass.setCalibration(cal);
// Show a smiley to indicate that we're done, and continue on with the user program.