Merge pull request #8100 from BastiaanOlij/ios_magnetometer_2.1

Fixing magnetometer on iOS
This commit is contained in:
Rémi Verschelde 2017-03-23 09:57:29 +01:00 committed by GitHub
commit fd17d301d0

View file

@ -299,7 +299,7 @@ static int frame_count = 0;
motionManager = [[CMMotionManager alloc] init]; motionManager = [[CMMotionManager alloc] init];
if (motionManager.deviceMotionAvailable) { if (motionManager.deviceMotionAvailable) {
motionManager.deviceMotionUpdateInterval = 1.0/70.0; motionManager.deviceMotionUpdateInterval = 1.0/70.0;
[motionManager startDeviceMotionUpdates]; [motionManager startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXMagneticNorthZVertical];
motionInitialised = YES; motionInitialised = YES;
}; };
}; };