[Sensor] Initialize data for batch type sensor (#1596)
authorMuHong Byun <mh.byun@samsung.com>
Mon, 11 May 2020 02:15:04 +0000 (11:15 +0900)
committerGitHub <noreply@github.com>
Mon, 11 May 2020 02:15:04 +0000 (11:15 +0900)
Signed-off-by: MuHong Byun <mh.byun@samsung.com>
src/Tizen.Sensor/Tizen.Sensor/BatchSensor.cs

index 8e86d7a..cb27092 100644 (file)
@@ -21,7 +21,9 @@ namespace Tizen.Sensor
 {
     public abstract class BatchSensor<TData> : Sensor where TData : Tizen.Sensor.BatchData
     {
-        public BatchSensor(uint index = 0) : base(index) { }
+        public BatchSensor(uint index = 0) : base(index) {
+            UpdateBatchData((IntPtr)null, 0);
+        }
         public IReadOnlyList<TData> Data { get; protected set; }
 
         /// <summary>