OSDN Git Service

GMINL-2659: Keep recent events history for fusion-like processing
[android-x86/hardware-intel-libsensors.git] / transform.c
index 97837f7..a49300d 100644 (file)
@@ -335,6 +335,9 @@ static int finalize_sample_default (int s, struct sensors_event_t* data)
                        break;
        }
 
+       /* Add this event to our global records, for filtering purposes */
+       record_sample(s, data);
+
        return 1; /* Return sample to Android */
 }
 
@@ -373,6 +376,9 @@ static int finalize_sample_ISH (int s, struct sensors_event_t* data)
                data->data[2] = -roll;
        }
 
+       /* Add this event to our global records, for filtering purposes */
+       record_sample(s, data);
+
        return 1; /* Return sample to Android */
 }