summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-07-10 17:18:38 -0700
committerKeith Packard <keithp@keithp.com>2014-07-10 17:35:44 -0700
commit013e9ccfbe76dc46e8c69ea314950bed83d9a39f (patch)
tree5cc6ca1679f23e89074bd65457f74d8ce31aaf13 /src/test
parent31ae24b5da3e198e7555ea3768d3cbdec3a28a5f (diff)
altos: Use 32-bits for flight state data (alt/speed/accel)
Stores 32-bits for all of the flight parameters. Uses 64-bit intermediates for kalman computation. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ao_flight_test.c5
-rw-r--r--src/test/ao_micropeak_test.c1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/test/ao_flight_test.c b/src/test/ao_flight_test.c
index 314998c1..bb5c3a7d 100644
--- a/src/test/ao_flight_test.c
+++ b/src/test/ao_flight_test.c
@@ -34,9 +34,11 @@
#define ao_data_ring_next(n) (((n) + 1) & (AO_DATA_RING - 1))
#define ao_data_ring_prev(n) (((n) - 1) & (AO_DATA_RING - 1))
+#if 0
#define AO_M_TO_HEIGHT(m) ((int16_t) (m))
#define AO_MS_TO_SPEED(ms) ((int16_t) ((ms) * 16))
#define AO_MSS_TO_ACCEL(mss) ((int16_t) ((mss) * 16))
+#endif
#define AO_GPS_NEW_DATA 1
#define AO_GPS_NEW_TRACKING 2
@@ -93,6 +95,7 @@ struct ao_adc {
#include <ao_data.h>
#include <ao_log.h>
#include <ao_telemetry.h>
+#include <ao_sample.h>
#if TELEMEGA
int ao_gps_count;
@@ -234,7 +237,7 @@ double main_time;
int tick_offset;
-static int32_t ao_k_height;
+static ao_k_t ao_k_height;
int16_t
ao_time(void)
diff --git a/src/test/ao_micropeak_test.c b/src/test/ao_micropeak_test.c
index 5961bd93..f4af707e 100644
--- a/src/test/ao_micropeak_test.c
+++ b/src/test/ao_micropeak_test.c
@@ -33,6 +33,7 @@ uint8_t ao_flight_debug;
#define AO_FLIGHT_TEST
typedef int32_t alt_t;
+typedef int32_t pres_t;
#define AO_MS_TO_TICKS(ms) ((ms) / 10)