From 36d493166eb5e7ee65206a8750d13c3476b83475 Mon Sep 17 00:00:00 2001 From: "kibak.yoon" Date: Tue, 25 Oct 2016 11:44:28 +0900 Subject: [PATCH] csapi-sensor: set default value to properties - add Unknown state(-1) to enum - change count type from int to uint Change-Id: Iaf917ccd2532573bf313ed1aebcd48e76302c894 Signed-off-by: kibak.yoon --- .../PedometerDataUpdatedEventArgs.cs | 14 ++++++------ .../Tizen.Sensor/Plugins/Accelerometer.cs | 6 ++--- .../Plugins/FaceDownGestureDetector.cs | 2 +- .../Tizen.Sensor/Plugins/GravitySensor.cs | 6 ++--- .../Tizen.Sensor/Plugins/Gyroscope.cs | 6 ++--- .../Plugins/GyroscopeRotationVectorSensor.cs | 8 +++---- .../Tizen.Sensor/Plugins/HeartRateMonitor.cs | 2 +- .../Tizen.Sensor/Plugins/HumiditySensor.cs | 2 +- .../Plugins/InVehicleActivityDetector.cs | 2 +- .../Tizen.Sensor/Plugins/LightSensor.cs | 2 +- .../Plugins/LinearAccelerationSensor.cs | 6 ++--- .../Tizen.Sensor/Plugins/Magnetometer.cs | 6 ++--- .../MagnetometerRotationVectorSensor.cs | 8 +++---- .../Tizen.Sensor/Plugins/OrientationSensor.cs | 6 ++--- .../Tizen.Sensor/Plugins/Pedometer.cs | 22 +++++++++---------- .../Plugins/PickUpGestureDetector.cs | 2 +- .../Tizen.Sensor/Plugins/PressureSensor.cs | 2 +- .../Tizen.Sensor/Plugins/ProximitySensor.cs | 2 +- .../Plugins/RotationVectorSensor.cs | 10 ++++----- .../Plugins/RunningActivityDetector.cs | 2 +- .../Tizen.Sensor/Plugins/SleepMonitor.cs | 2 +- .../Plugins/StationaryActivityDetector.cs | 2 +- .../Tizen.Sensor/Plugins/TemperatureSensor.cs | 2 +- .../Tizen.Sensor/Plugins/UltravioletSensor.cs | 2 +- .../Plugins/UncalibratedGyroscope.cs | 12 +++++----- .../Plugins/UncalibratedMagnetometer.cs | 12 +++++----- .../Plugins/WalkingActivityDetector.cs | 2 +- .../Plugins/WristUpGestureDetector.cs | 2 +- .../Tizen.Sensor/SensorEnumerations.cs | 14 ++++++++++-- 29 files changed, 88 insertions(+), 78 deletions(-) diff --git a/Tizen.Sensor/Tizen.Sensor/EventArgs/PedometerDataUpdatedEventArgs.cs b/Tizen.Sensor/Tizen.Sensor/EventArgs/PedometerDataUpdatedEventArgs.cs index c767740..656232b 100644 --- a/Tizen.Sensor/Tizen.Sensor/EventArgs/PedometerDataUpdatedEventArgs.cs +++ b/Tizen.Sensor/Tizen.Sensor/EventArgs/PedometerDataUpdatedEventArgs.cs @@ -17,9 +17,9 @@ namespace Tizen.Sensor { internal PedometerDataUpdatedEventArgs(float[] values) { - StepCount = (int) values[0]; - WalkStepCount = (int) values[1]; - RunStepCount = (int) values[2]; + StepCount = (uint) values[0]; + WalkStepCount = (uint) values[1]; + RunStepCount = (uint) values[2]; MovingDistance = values[3]; CalorieBurned = values[4]; LastSpeed = values[5]; @@ -30,17 +30,17 @@ namespace Tizen.Sensor /// /// Gets the step count /// - public int StepCount { get; private set; } + public uint StepCount { get; private set; } /// /// Gets the walking step count /// - public int WalkStepCount { get; private set; } + public uint WalkStepCount { get; private set; } /// /// Gets the running step count /// - public int RunStepCount { get; private set; } + public uint RunStepCount { get; private set; } /// /// Gets the moving distance @@ -67,4 +67,4 @@ namespace Tizen.Sensor /// public PedometerState LastStepStatus { get; private set; } } -} \ No newline at end of file +} diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs index 4a32f9a..7e5c23f 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs @@ -19,17 +19,17 @@ namespace Tizen.Sensor /// /// Gets the X component of the acceleration. /// - public float X { get; private set; } + public float X { get; private set; } = float.MinValue; /// /// Gets the Y component of the acceleration. /// - public float Y { get; private set; } + public float Y { get; private set; } = float.MinValue; /// /// Gets the Z component of the acceleration. /// - public float Z { get; private set; } + public float Z { get; private set; } = float.MinValue; /// /// Returns true or false based on whether accelerometer sensor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs index e29d6b7..4bfc32e 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the state of the face down gesture. /// - public DetectorState FaceDown { get; private set; } + public DetectorState FaceDown { get; private set; } = DetectorState.Unknown; /// /// Returns true or false based on whether face down gesture detector is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs index 44b942b..e7812c5 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs @@ -21,17 +21,17 @@ namespace Tizen.Sensor /// /// Gets the X component of the gravity. /// - public float X { get; private set; } + public float X { get; private set; } = float.MinValue; /// /// Gets the Y component of the gravity. /// - public float Y { get; private set; } + public float Y { get; private set; } = float.MinValue; /// /// Gets the Z component of the gravity. /// - public float Z { get; private set; } + public float Z { get; private set; } = float.MinValue; /// /// Returns true or false based on whether gravity sensor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs index 10d7953..9d29073 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs @@ -20,17 +20,17 @@ namespace Tizen.Sensor /// /// Gets the X component of the acceleration. /// - public float X { get; private set; } + public float X { get; private set; } = float.MinValue; /// /// Gets the Y component of the acceleration. /// - public float Y { get; private set; } + public float Y { get; private set; } = float.MinValue; /// /// Gets the Z component of the acceleration. /// - public float Z { get; private set; } + public float Z { get; private set; } = float.MinValue; /// /// Returns true or false based on whether gyroscope sensor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs index 4bd07ab..5d948e1 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs @@ -20,22 +20,22 @@ namespace Tizen.Sensor /// /// Gets the X component of the gyroscope rotation vector. /// - public float X { get; private set; } + public float X { get; private set; } = float.MinValue; /// /// Gets the Y component of the gyroscope rotation vector. /// - public float Y { get; private set; } + public float Y { get; private set; } = float.MinValue; /// /// Gets the Z component of the gyroscope rotation vector. /// - public float Z { get; private set; } + public float Z { get; private set; } = float.MinValue; /// /// Gets the W component of the gyroscope rotation vector. /// - public float W { get; private set; } + public float W { get; private set; } = float.MinValue; /// /// Gets the Accuracy of the gyroscope rotation vector data. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs index 54d6fb5..3ec478d 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the value of the heart rate monitor. /// - public int HeartRate { get; private set; } + public int HeartRate { get; private set; } = int.MinValue; /// /// Returns true or false based on whether heart rate monitor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs index 128e86e..28e6fbc 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the value of the humidity sensor. /// - public float Humidity { get; private set; } + public float Humidity { get; private set; } = float.MinValue; /// /// Returns true or false based on whether humidity sensor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs index 7b5cffa..035b0c3 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the state of in-vehicle activity detector /// - public DetectorState InVehicle { get; private set; } + public DetectorState InVehicle { get; private set; } = DetectorState.Unknown; /// /// Returns true or false based on whether in-vehicle activity detector is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs index 2bbe5fd..485ffa5 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the Level of the light. /// - public float Level { get; private set; } + public float Level { get; private set; } = float.MinValue; /// /// Returns true or false based on whether light sensor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs index eefb258..43a42ee 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs @@ -21,17 +21,17 @@ namespace Tizen.Sensor /// /// Gets the X component of the linear acceleration. /// - public float X { get; private set; } + public float X { get; private set; } = float.MinValue; /// /// Gets the Y component of the linear acceleration. /// - public float Y { get; private set; } + public float Y { get; private set; } = float.MinValue; /// /// Gets the Z component of the linear acceleration. /// - public float Z { get; private set; } + public float Z { get; private set; } = float.MinValue; /// /// Returns true or false based on whether linear acceleration sensor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs index 80baee8..fffb672 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs @@ -21,17 +21,17 @@ namespace Tizen.Sensor /// /// Gets the X component of the magnetometer. /// - public float X { get; private set; } + public float X { get; private set; } = float.MinValue; /// /// Gets the Y component of the magnetometer. /// - public float Y { get; private set; } + public float Y { get; private set; } = float.MinValue; /// /// Gets the Z component of the magnetometer. /// - public float Z { get; private set; } + public float Z { get; private set; } = float.MinValue; /// /// Returns true or false based on whether magnetometer is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs index 1b7b104..948407e 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs @@ -21,22 +21,22 @@ namespace Tizen.Sensor /// /// Gets the X component of the magnetometer rotation vector. /// - public float X { get; private set; } + public float X { get; private set; } = float.MinValue; /// /// Gets the Y component of the magnetometer rotation vector. /// - public float Y { get; private set; } + public float Y { get; private set; } = float.MinValue; /// /// Gets the Z component of the magnetometer rotation vector. /// - public float Z { get; private set; } + public float Z { get; private set; } = float.MinValue; /// /// Gets the W component of the magnetometer rotation vector. /// - public float W { get; private set; } + public float W { get; private set; } = float.MinValue; /// /// Gets the Accuracy of the magnetometer rotation vector data. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs index ae8512b..fab0a0e 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs @@ -21,17 +21,17 @@ namespace Tizen.Sensor /// /// Gets the Azimuth component of the orientation. /// - public float Azimuth { get; private set; } + public float Azimuth { get; private set; } = float.MinValue; /// /// Gets the Pitch component of the orientation. /// - public float Pitch { get; private set; } + public float Pitch { get; private set; } = float.MinValue; /// /// Gets the Roll component of the orientation. /// - public float Roll { get; private set; } + public float Roll { get; private set; } = float.MinValue; /// /// Returns true or false based on whether orientation sensor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs index 32178d9..911ec16 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs @@ -20,42 +20,42 @@ namespace Tizen.Sensor /// /// Gets the step count /// - public int StepCount { get; private set; } + public uint StepCount { get; private set; } = 0; /// /// Gets the walking step count /// - public int WalkStepCount { get; private set; } + public uint WalkStepCount { get; private set; } = 0; /// /// Gets the running step count /// - public int RunStepCount { get; private set; } + public uint RunStepCount { get; private set; } = 0; /// /// Gets the moving distance /// - public float MovingDistance { get; private set; } + public float MovingDistance { get; private set; } = 0; /// /// Gets the calorie burned /// - public float CalorieBurned { get; private set; } + public float CalorieBurned { get; private set; } = 0; /// /// Gets the last speed /// - public float LastSpeed { get; private set; } + public float LastSpeed { get; private set; } = 0; /// /// Gets the last stepping frequency /// - public float LastSteppingFrequency { get; private set; } + public float LastSteppingFrequency { get; private set; } = 0; /// /// Gets the last step status /// - public PedometerState LastStepStatus { get; private set; } + public PedometerState LastStepStatus { get; private set; } = PedometerState.Unknown; /// /// Returns true or false based on whether pedometer sensor is supported by device. @@ -149,9 +149,9 @@ namespace Tizen.Sensor { Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr); TimeSpan = new TimeSpan((Int64)sensorData.timestamp); - StepCount = (int)sensorData.values[0]; - WalkStepCount = (int)sensorData.values[1]; - RunStepCount = (int)sensorData.values[2]; + StepCount = (uint)sensorData.values[0]; + WalkStepCount = (uint)sensorData.values[1]; + RunStepCount = (uint)sensorData.values[2]; MovingDistance = sensorData.values[3]; CalorieBurned = sensorData.values[4]; LastSpeed = sensorData.values[5]; diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs index 80c2739..c140ebb 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the state of the pick up gesture. /// - public DetectorState PickUp { get; private set; } + public DetectorState PickUp { get; private set; } = DetectorState.Unknown; /// /// Returns true or false based on whether pick up gesture detector is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs index 55d7b42..c23bc05 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the value of the pressure sensor. /// - public float Pressure { get; private set; } + public float Pressure { get; private set; } = float.MinValue; /// /// Returns true or false based on whether pressure sensor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs index 898269f..d793ff1 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the proximity state. /// - public ProximitySensorState Proximity { get; private set; } + public ProximitySensorState Proximity { get; private set; } = ProximitySensorState.Unknown; /// /// Returns true or false based on whether proximity sensor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs index 4c400c3..43942e1 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs @@ -21,27 +21,27 @@ namespace Tizen.Sensor /// /// Gets the X component of the rotation vector. /// - public float X { get; private set; } + public float X { get; private set; } = float.MinValue; /// /// Gets the Y component of the rotation vector. /// - public float Y { get; private set; } + public float Y { get; private set; } = float.MinValue; /// /// Gets the Z component of the rotation vector. /// - public float Z { get; private set; } + public float Z { get; private set; } = float.MinValue; /// /// Gets the W component of the rotation vector. /// - public float W { get; private set; } + public float W { get; private set; } = float.MinValue; /// /// Gets the Accuracy of the rotation vector data. /// - public SensorDataAccuracy Accuracy { get; private set; } + public SensorDataAccuracy Accuracy { get; private set; } = SensorDataAccuracy.Undefined; /// /// Returns true or false based on whether rotation vector sensor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs index 72fe410..f1c0990 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the state of running activity detector /// - public DetectorState Running { get; private set; } + public DetectorState Running { get; private set; } = DetectorState.Unknown; /// /// Returns true or false based on whether running activity detector is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs index 543f5e6..dfd3ffa 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the value of the sleep state. /// - public SleepMonitorState SleepState { get; private set; } + public SleepMonitorState SleepState { get; private set; } = SleepMonitorState.Unknown; /// /// Returns true or false based on whether sleep monitor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs index b5c5b7c..39504bb 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the state of stationary activity detector /// - public DetectorState Stationary { get; private set; } + public DetectorState Stationary { get; private set; } = DetectorState.Unknown; /// /// Returns true or false based on whether stationary activity detector is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs index 3fdc409..68a7ebd 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the value of the temperature sensor. /// - public float Temperature { get; private set; } + public float Temperature { get; private set; } = float.MinValue; /// /// Returns true or false based on whether temperature sensor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs index 4aeba27..6009d90 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the value of the ultraviolet sensor. /// - public float UltravioletIndex { get; private set; } + public float UltravioletIndex { get; private set; } = float.MinValue; /// /// Returns true or false based on whether ultraviolet sensor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs index e3a8b87..04c368a 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs @@ -20,32 +20,32 @@ namespace Tizen.Sensor /// /// Gets the X component of the acceleration. /// - public float X { get; private set; } + public float X { get; private set; } = float.MinValue; /// /// Gets the Y component of the acceleration. /// - public float Y { get; private set; } + public float Y { get; private set; } = float.MinValue; /// /// Gets the Z component of the acceleration. /// - public float Z { get; private set; } + public float Z { get; private set; } = float.MinValue; /// /// Gets the BiasX component of the uncalibrated gyroscope data. /// - public float BiasX { get; private set; } + public float BiasX { get; private set; } = 0; /// /// Gets the BiasY component of the uncalibrated gyroscope data. /// - public float BiasY { get; private set; } + public float BiasY { get; private set; } = 0; /// /// Gets the BiasZ component of the uncalibrated gyroscope data. /// - public float BiasZ { get; private set; } + public float BiasZ { get; private set; } = 0; /// /// Returns true or false based on whether uncalibrated gyroscope sensor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs index c877116..7da8d5f 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs @@ -21,32 +21,32 @@ namespace Tizen.Sensor /// /// Gets the X component of the acceleration. /// - public float X { get; private set; } + public float X { get; private set; } = float.MinValue; /// /// Gets the Y component of the acceleration. /// - public float Y { get; private set; } + public float Y { get; private set; } = float.MinValue; /// /// Gets the Z component of the acceleration. /// - public float Z { get; private set; } + public float Z { get; private set; } = float.MinValue; /// /// Gets the BiasX component of the uncalibrated magnetometer data. /// - public float BiasX { get; private set; } + public float BiasX { get; private set; } = 0; /// /// Gets the BiasY component of the uncalibrated magnetometer data. /// - public float BiasY { get; private set; } + public float BiasY { get; private set; } = 0; /// /// Gets the BiasZ component of the uncalibrated magnetometer data. /// - public float BiasZ { get; private set; } + public float BiasZ { get; private set; } = 0; /// /// Returns true or false based on whether uncalibrated magnetometer sensor is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs index 3b7dbf3..d82fc78 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the state of walking activity detector /// - public DetectorState Walking { get; private set; } + public DetectorState Walking { get; private set; } = DetectorState.Unknown; /// /// Returns true or false based on whether walking activity detector is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs b/Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs index 3c92416..aa51a6c 100644 --- a/Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs +++ b/Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs @@ -20,7 +20,7 @@ namespace Tizen.Sensor /// /// Gets the state of the wrist up gesture. /// - public DetectorState WristUp { get; private set; } + public DetectorState WristUp { get; private set; } = DetectorState.Unknown; /// /// Returns true or false based on whether wrist up gesture detector is supported by device. diff --git a/Tizen.Sensor/Tizen.Sensor/SensorEnumerations.cs b/Tizen.Sensor/Tizen.Sensor/SensorEnumerations.cs index 0999a77..90d1ffc 100644 --- a/Tizen.Sensor/Tizen.Sensor/SensorEnumerations.cs +++ b/Tizen.Sensor/Tizen.Sensor/SensorEnumerations.cs @@ -203,7 +203,7 @@ namespace Tizen.Sensor /// /// Unknown. /// - Unknown, + Unknown = -1, /// /// Stop state. @@ -229,7 +229,7 @@ namespace Tizen.Sensor /// /// Unknown. /// - Unknown, + Unknown = -1, /// /// The wake state. @@ -247,6 +247,11 @@ namespace Tizen.Sensor /// public enum ProximitySensorState { + /// + /// Unknown. + /// + Unknown = -1, + /// /// Near sate. /// @@ -263,6 +268,11 @@ namespace Tizen.Sensor /// public enum DetectorState { + /// + /// Unknown. + /// + Unknown = -1, + /// /// None sate. /// -- 2.34.1