コード例 #1
0
ファイル: Magnetometer.android.cs プロジェクト: sung-su/maui
        void PlatformStart(SensorSpeed sensorSpeed)
        {
            var delay = sensorSpeed.ToPlatform();

            listener = new MagnetometerListener(RaiseReadingChanged);
            SensorManager !.RegisterListener(listener, Sensor, delay);
        }
コード例 #2
0
ファイル: Barometer.tizen.cs プロジェクト: sung-su/maui
 void PlatformStart(SensorSpeed sensorSpeed)
 {
     sensor              = DefaultSensor;
     sensor.Interval     = sensorSpeed.ToPlatform();
     sensor.DataUpdated += DataUpdated;
     sensor.Start();
 }
コード例 #3
0
        internal static void PlatformStart(SensorSpeed sensorSpeed)
        {
            var manager = Platform.MotionManager;

            manager.MagnetometerUpdateInterval = sensorSpeed.ToPlatform();
            manager.StartMagnetometerUpdates(Platform.GetCurrentQueue(), DataUpdated);
        }
コード例 #4
0
        void PlatformStart(SensorSpeed sensorSpeed)
        {
            MotionManager.DeviceMotionUpdateInterval = sensorSpeed.ToPlatform();

            // use a fixed reference frame where X points north and Z points vertically into the sky
            MotionManager.StartDeviceMotionUpdates(CMAttitudeReferenceFrame.XTrueNorthZVertical, NSOperationQueue.CurrentQueue ?? new NSOperationQueue(), DataUpdated);
        }
コード例 #5
0
        void PlatformStart(SensorSpeed sensorSpeed)
        {
            var manager = Platform.MotionManager;

            manager.AccelerometerUpdateInterval = sensorSpeed.ToPlatform();
            manager.StartAccelerometerUpdates(Platform.GetCurrentQueue(), DataUpdated);
        }
コード例 #6
0
        internal static void PlatformStart(SensorSpeed sensorSpeed)
        {
            var delay = sensorSpeed.ToPlatform();

            listener          = new OrientationSensorListener();
            orientationSensor = Platform.SensorManager.GetDefaultSensor(SensorType.RotationVector);
            Platform.SensorManager.RegisterListener(listener, orientationSensor, delay);
        }
コード例 #7
0
ファイル: Magnetometer.android.cs プロジェクト: gywerd/CPUI
        internal static void PlatformStart(SensorSpeed sensorSpeed)
        {
            var delay = sensorSpeed.ToPlatform();

            listener     = new MagnetometerListener();
            magnetometer = Platform.SensorManager.GetDefaultSensor(SensorType.MagneticField);
            Platform.SensorManager.RegisterListener(listener, magnetometer, delay);
        }
コード例 #8
0
        internal static void PlatformStart(SensorSpeed sensorSpeed)
        {
            var delay = sensorSpeed.ToPlatform();

            listener  = new GyroscopeListener();
            gyroscope = Platform.SensorManager.GetDefaultSensor(SensorType.Gyroscope);
            Platform.SensorManager.RegisterListener(listener, gyroscope, delay);
        }
コード例 #9
0
        void PlatformStart(SensorSpeed sensorSpeed, bool applyLowPassFilter)
        {
            sensor = DefaultSensor;

            sensor.Interval     = sensorSpeed.ToPlatform();
            sensor.DataUpdated += DataUpdated;
            sensor.Start();
        }
コード例 #10
0
ファイル: Accelerometer.android.cs プロジェクト: sung-su/maui
        void PlatformStart(SensorSpeed sensorSpeed)
        {
            _listener = new AccelerometerListener(OnChanged);

            var delay = sensorSpeed.ToPlatform();

            SensorManager !.RegisterListener(_listener, Sensor, delay);
        }
コード例 #11
0
        internal static void PlatformStart(SensorSpeed sensorSpeed)
        {
            var delay = sensorSpeed.ToPlatform();

            listener      = new AccelerometerListener();
            accelerometer = Platform.SensorManager.GetDefaultSensor(SensorType.Accelerometer);
            Platform.SensorManager.RegisterListener(listener, accelerometer, delay);
        }
コード例 #12
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);
        }
コード例 #13
0
        void PlatformStart(SensorSpeed sensorSpeed)
        {
            sensor = DefaultSensor;

            var interval = sensorSpeed.ToPlatform();

            sensor.ReportInterval  = sensor.MinimumReportInterval >= interval ? sensor.MinimumReportInterval : interval;
            sensor.ReadingChanged += DataUpdated;
        }
コード例 #14
0
ファイル: Barometer.uwp.cs プロジェクト: josephwambura/maui
        void PlatformStart(SensorSpeed sensorSpeed)
        {
            sensor = DefaultBarometer;

            var interval = sensorSpeed.ToPlatform();

            sensor.ReportInterval = sensor.MinimumReportInterval >= interval ? sensor.MinimumReportInterval : interval;

            sensor.ReadingChanged += BarometerReportedInterval;
        }
コード例 #15
0
ファイル: Compass.android.cs プロジェクト: gywerd/CPUI
        internal static void PlatformStart(SensorSpeed sensorSpeed, bool applyLowPassFilter)
        {
            var delay = sensorSpeed.ToPlatform();

            accelerometer = Platform.SensorManager.GetDefaultSensor(SensorType.Accelerometer);
            magnetometer  = Platform.SensorManager.GetDefaultSensor(SensorType.MagneticField);
            listener      = new SensorListener(accelerometer.Name, magnetometer.Name, delay, applyLowPassFilter);
            Platform.SensorManager.RegisterListener(listener, accelerometer, delay);
            Platform.SensorManager.RegisterListener(listener, magnetometer, delay);
        }
コード例 #16
0
 internal static void PlatformStart(SensorSpeed sensorSpeed)
 {
     DefaultSensor.Interval     = sensorSpeed.ToPlatform();
     DefaultSensor.DataUpdated += DataUpdated;
     DefaultSensor.Start();
 }
コード例 #17
0
 void PlatformStart(SensorSpeed sensorSpeed)
 {
     listener  = new BarometerListener(RaiseReadingChanged);
     barometer = DefaultBarometer;
     Platform.SensorManager.RegisterListener(listener, barometer, sensorSpeed.ToPlatform());
 }
コード例 #18
0
ファイル: Compass.tizen.cs プロジェクト: gywerd/CPUI
 internal static void PlatformStart(SensorSpeed sensorSpeed, bool applyLowPassFilter)
 {
     DefaultSensor.Interval     = sensorSpeed.ToPlatform();
     DefaultSensor.DataUpdated += DataUpdated;
     DefaultSensor.Start();
 }
コード例 #19
0
 void PlatformStart(SensorSpeed sensorSpeed)
 {
     MotionManager.GyroUpdateInterval = sensorSpeed.ToPlatform();
     MotionManager.StartGyroUpdates(NSOperationQueue.CurrentQueue ?? new NSOperationQueue(), DataUpdated);
 }
コード例 #20
0
 void PlatformStart(SensorSpeed sensorSpeed)
 {
     _listener = new BarometerListener(RaiseReadingChanged);
     SensorManager !.RegisterListener(_listener, Sensor, sensorSpeed.ToPlatform());
 }
コード例 #21
0
 static void PlatformStart(SensorSpeed sensorSpeed)
 {
     listener  = new BarometerListener();
     barometer = DefaultBarometer;
     Platform.SensorManager.RegisterListener(listener, barometer, sensorSpeed.ToPlatform());
 }