projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Use alt_t for all Pascal-based altitude data
[fw/altos]
/
src
/
core
/
ao_data.h
diff --git
a/src/core/ao_data.h
b/src/core/ao_data.h
index 2b9ef5ace922e5f4e5c4809da63d5524a1cf7305..90182b1253bb53e6620b74b1a0d6b1cf30b18458 100644
(file)
--- 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;
#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)
#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
#endif
+#if !HAS_BARO
+typedef int16_t alt_t;
+#endif
+
/*
* Need a few macros to pull data from the sensors:
*
/*
* Need a few macros to pull data from the sensors:
*