コード例 #1
0
        internal static void PlatformStart(SensorSpeed sensorSpeed)
        {
            var manager = Platform.MotionManager;

            manager.MagnetometerUpdateInterval = sensorSpeed.ToPlatform();
            manager.StartMagnetometerUpdates(Platform.GetCurrentQueue(), DataUpdated);
        }
コード例 #2
0
        static void PlatformStart(SensorSpeed sensorSpeed)
        {
            altitudeManager = new CMAltimeter();
            altitudeManager.StartRelativeAltitudeUpdates(Platform.GetCurrentQueue(), LocationManagerUpdatedHeading);

            void LocationManagerUpdatedHeading(CMAltitudeData e, NSError error) =>
            OnChanged(new BarometerData(UnitConverters.KilopascalsToHectopascals(e.Pressure.DoubleValue)));
        }
コード例 #3
0
        internal static void PlatformStart(SensorSpeed sensorSpeed)
        {
            var manager = Platform.MotionManager;

            manager.DeviceMotionUpdateInterval = sensorSpeed.ToPlatform();

            // use a fixed reference frame where X points north and Z points vertically into the sky
            manager.StartDeviceMotionUpdates(CMAttitudeReferenceFrame.XTrueNorthZVertical, Platform.GetCurrentQueue(), DataUpdated);
        }