I am creating test app that receives gyroscope pitch, roll and yaw.
This code does not work as I would think it would:
- (void) enableGyro {
motionManager.deviceMotionUpdateInterval = 1.0/30.0;
if (motionManager.gyroAvailable) {
[motionManager startGyroUpdates];
}
NSLog(@"Gyro Available? %@", (motionManager.gyroAvailable ? @"YES" : @"NO"));
NSLog(@"Gyro Active? %@", (motionManager.gyroActive ? @"YES" : @"NO"));
}
The output of that is
2011-09-29 16:37:08.070 Gyro2[4014:607] Gyro Available? YES
2011-09-29 16:37:08.074 Gyro2[4014:607] Gyro Active? NO
I don't understand why, when I begin the gyro updates, it does not actually start.