diff options
author | Keith Packard <keithp@keithp.com> | 2012-09-09 13:46:23 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-09-09 13:46:23 -0700 |
commit | 27ab744c6eec9243b7aa14161eec2fbf7003531e (patch) | |
tree | 76d4df6846eac45ad01510c69d9bbef2919d84fd /src/test/ao_flight_test.c | |
parent | ced6a020d6d94b1c63837a7ab5b0091b7b8ea3c9 (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/test/ao_flight_test.c')
-rw-r--r-- | src/test/ao_flight_test.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/test/ao_flight_test.c b/src/test/ao_flight_test.c index a4ef8dc0..b9e291ce 100644 --- a/src/test/ao_flight_test.c +++ b/src/test/ao_flight_test.c @@ -54,6 +54,15 @@ struct ao_adc { #define __code #define __reentrant +#define HAS_FLIGHT 1 +#define HAS_IGNITE 1 +#define HAS_USB 1 +#define HAS_GPS 1 +#ifndef HAS_ACCEL +#define HAS_ACCEL 1 +#define HAS_ACCEL_REF 0 +#endif + #include <ao_data.h> #define to_fix16(x) ((int16_t) ((x) * 65536.0 + 0.5)) @@ -200,24 +209,17 @@ struct ao_config ao_config; #define DATA_TO_XDATA(x) (x) -#define HAS_FLIGHT 1 -#define HAS_IGNITE 1 -#define HAS_ADC 1 -#define HAS_USB 1 -#define HAS_GPS 1 -#ifndef HAS_ACCEL -#define HAS_ACCEL 1 -#define HAS_ACCEL_REF 0 -#endif #define GRAVITY 9.80665 extern int16_t ao_ground_accel, ao_flight_accel; extern int16_t ao_accel_2g; +typedef int16_t accel_t; + extern uint16_t ao_sample_tick; extern int16_t ao_sample_height; -extern int16_t ao_sample_accel; +extern accel_t ao_sample_accel; extern int32_t ao_accel_scale; extern int16_t ao_ground_height; extern int16_t ao_sample_alt; |