summaryrefslogtreecommitdiff
path: root/src/core/ao_sample.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-09-09 13:46:23 -0700
committerKeith Packard <keithp@keithp.com>2012-09-09 13:46:23 -0700
commit27ab744c6eec9243b7aa14161eec2fbf7003531e (patch)
tree76d4df6846eac45ad01510c69d9bbef2919d84fd /src/core/ao_sample.c
parentced6a020d6d94b1c63837a7ab5b0091b7b8ea3c9 (diff)
altos: Clean up flight data definitions
These just shuffle the various definitions of data macros around to make the include files more sensible looking. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao_sample.c')
-rw-r--r--src/core/ao_sample.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/ao_sample.c b/src/core/ao_sample.c
index 6461def0..985c0940 100644
--- a/src/core/ao_sample.c
+++ b/src/core/ao_sample.c
@@ -134,10 +134,12 @@ ao_sample(void)
ao_data = (struct ao_data *) &ao_data_ring[ao_sample_data];
ao_sample_tick = ao_data->tick;
+#if HAS_BARO
ao_data_pres_cook(ao_data);
ao_sample_pres = ao_data_pres(ao_data);
ao_sample_alt = pres_to_altitude(ao_sample_pres);
ao_sample_height = ao_sample_alt - ao_ground_height;
+#endif
#if HAS_ACCEL
ao_sample_accel = ao_data_accel_cook(ao_data);