Hello Everybody,
i have the following problem:
I try to access the magnetometer values and have a problem with the interval.
So how i access the values:
first i create a CMMotionManager:
var myMotionManager= CMMotionManager()
after that i set the interval( need the values as fast as possible)
myMotionManager.magnetometerUpdateInterval = 0.02;
after that i start the getting values:
myMotionManager.startMagnetometerUpdates(to.... in....)
it working good. So i get every 20ms new values!
I try that on a iPhone 5, iPhone 5s and iPhone SE with iOS 10.2 and iPhone 6 with iOS 9.3.2
Now i try to change the interval to 10ms so first change the magnetometerUpdateInterval to 0.01
What i see is that is working good on iPhone 5 and iPhone 5s.
event: MagnetUpdate - 9.734 ms
event: MagnetUpdate - 10.245 ms
event: MagnetUpdate - 11.346 ms
event: MagnetUpdate - 10.687 ms
What does the iPhone 6?
- set it back to 20ms
event: MagnetUpdate - 20.234 ms
event: MagnetUpdate - 20.245 ms
event: MagnetUpdate - 20.346 ms
event: MagnetUpdate - 20.687 ms
_______________________________________
What does the iPhone SE ?
- very strange !
i see two events
______log____________
event: MagnetUpdate - 20.234 ms
event: MagnetUpdate - 0.0124 ms
event: MagnetUpdate - 20.164 ms
event: MagnetUpdate - 0.0137 ms
_____________________
The intervall is measured between the events.
Do i something wrong or is that a bug on the iPhone SE? Have someone the same problem? How get the maximum interval from each device?