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:
parent
7b7998e4eb
commit
a209857007
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue