diff options
author | Keith Packard <keithp@keithp.com> | 2012-10-12 13:57:49 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-10-12 13:57:49 -0700 |
commit | 175380a436efa35bbfae2ee5e29e12e9ef86fbde (patch) | |
tree | 79a0348efd9ce552c3959ca59ce19de6e976b82a /src/core/ao_data.h | |
parent | be0a28ee7a6fbd98fc8113db8501bb791a112fa0 (diff) |
altos: Use alt_t for all Pascal-based altitude data
This allows alt_t to be overridden for systems using the MS5607/MS5611
sensors
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao_data.h')
-rw-r--r-- | src/core/ao_data.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/ao_data.h b/src/core/ao_data.h index 2b9ef5ac..90182b12 100644 --- a/src/core/ao_data.h +++ b/src/core/ao_data.h @@ -110,7 +110,12 @@ extern volatile __data uint8_t ao_data_count; #define HAS_BARO 1 typedef int32_t pres_t; -typedef int32_t alt_t; + +#ifndef AO_ALT_TYPE +#define AO_ALT_TYPE int32_t +#endif + +typedef AO_ALT_TYPE alt_t; #define ao_data_pres_cook(packet) ao_ms5607_convert(&packet->ms5607_raw, &packet->ms5607_cooked) @@ -135,6 +140,10 @@ typedef int16_t alt_t; #endif +#if !HAS_BARO +typedef int16_t alt_t; +#endif + /* * Need a few macros to pull data from the sensors: * |