altos: add high-z accel and mag sensor to megametrum logging
authorKeith Packard <keithp@keithp.com>
Sat, 2 Jun 2012 02:34:17 +0000 (19:34 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 2 Jun 2012 02:34:17 +0000 (19:34 -0700)
These nicely fill the 32-byte sensor log record

Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_log.h

index e585750f9a73c20def2d4b101119e2b162ac46fa..04abeb7e583ae25e296f35c25ff87e1d3a850651 100644 (file)
@@ -216,13 +216,17 @@ struct ao_log_mega {
                        int16_t         gyro_x;         /* 18 */
                        int16_t         gyro_y;         /* 20 */
                        int16_t         gyro_z;         /* 22 */
-               } sensor;       /* 24 */
+                       int16_t         mag_x;          /* 24 */
+                       int16_t         mag_y;          /* 26 */
+                       int16_t         mag_z;          /* 28 */
+                       int16_t         accel;          /* 30 */
+               } sensor;       /* 32 */
                struct {
                        int16_t         v_batt;         /* 4 */
-                       int16_t         v_pbatt;        /* 8 */
-                       int16_t         n_sense;        /* 10 */
-                       int16_t         sense[10];      /* 12 */
-               } volt;                                 /* 32 */
+                       int16_t         v_pbatt;        /* 6 */
+                       int16_t         n_sense;        /* 8 */
+                       int16_t         sense[10];      /* 10 */
+               } volt;                                 /* 30 */
                struct {
                        int32_t         latitude;       /* 4 */
                        int32_t         longitude;      /* 8 */