OSDN Git Service

Better coordinate frequencies of co-located iio sensors
[android-x86/hardware-intel-libsensors.git] / filtering.h
index 78f890f..e899202 100644 (file)
@@ -1,25 +1,11 @@
 #ifndef FILTERING_H
 #define FILTERING_H
 
-#define SAMPLE_SIZE 7
+#define        GYRO_MIN_SAMPLES 5 /* Drop first few gyro samples after enable */
 
-struct circ_buff
-{
-       float* buff;
-       unsigned int idx;
-       unsigned int count;
-       unsigned int size;
-};
-
-struct filter
-{
-       struct circ_buff* x_buff;
-       struct circ_buff* y_buff;
-       struct circ_buff* z_buff;
-};
-
-void add_to_buff(struct circ_buff* circ_buff, float val);
-float median(float* queue, unsigned int size);
-void denoise_median(struct sensors_event_t* event, struct sensor_info_t* info);
+void setup_noise_filtering             (int s);
+void release_noise_filtering_data      (int s);
+void denoise                           (int s, struct sensors_event_t* event);
+void record_sample                     (int s, const sensors_event_t* data);
 
 #endif