Get megametrum ready to at least log flight data
[fw/altos] / src / core / ao_sample.h
index fb0e69e87e23c998fee745464e0ad33fb6d9f403..189b20197d81dfc7c6bf86e20cafcf4a2fb91e25 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef _AO_SAMPLE_H_
 #define _AO_SAMPLE_H_
 
+#include <ao_data.h>
+
 /*
  * ao_sample.c
  */
 #define AO_MSS_TO_ACCEL(mss)   ((int16_t) ((mss) * 16))
 
 extern __pdata uint16_t        ao_sample_tick;         /* time of last data */
-extern __pdata int16_t ao_sample_pres;         /* most recent pressure sensor reading */
-extern __pdata int16_t ao_sample_alt;          /* MSL of ao_sample_pres */
-extern __pdata int16_t ao_sample_height;       /* AGL of ao_sample_pres */
+extern __pdata pres_t  ao_sample_pres;         /* most recent pressure sensor reading */
+extern __pdata alt_t   ao_sample_alt;          /* MSL of ao_sample_pres */
+extern __pdata alt_t   ao_sample_height;       /* AGL of ao_sample_pres */
 extern __data uint8_t  ao_sample_adc;          /* Ring position of last processed sample */
+extern __data uint8_t  ao_sample_data;         /* Ring position of last processed sample */
 
 #if HAS_ACCEL
-extern __pdata int16_t ao_sample_accel;        /* most recent accel sensor reading */
+extern __pdata accel_t ao_sample_accel;        /* most recent accel sensor reading */
 #endif
 
-extern __pdata int16_t ao_ground_pres;         /* startup pressure */
-extern __pdata int16_t ao_ground_height;       /* MSL of ao_ground_pres */
+extern __pdata pres_t  ao_ground_pres;         /* startup pressure */
+extern __pdata alt_t   ao_ground_height;       /* MSL of ao_ground_pres */
 
 #if HAS_ACCEL
-extern __pdata int16_t ao_ground_accel;        /* startup acceleration */
-extern __pdata int16_t         ao_accel_2g;            /* factory accel calibration */
+extern __pdata accel_t ao_ground_accel;        /* startup acceleration */
+extern __pdata accel_t         ao_accel_2g;            /* factory accel calibration */
 extern __pdata int32_t ao_accel_scale;         /* sensor to m/s² conversion */
 #endif