aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-04-28 20:29:45 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-04-28 20:29:45 +0200
commit7aefcb7a09a12fae2dcbe2bc2360948aefbb66a4 (patch)
tree3a808a65302c32c82c9947dc491afd932c053ecf
parent238a3636faae13c4ba52ab9581a305c7a069276e (diff)
downloadpx4-firmware-7aefcb7a09a12fae2dcbe2bc2360948aefbb66a4.tar.gz
px4-firmware-7aefcb7a09a12fae2dcbe2bc2360948aefbb66a4.tar.bz2
px4-firmware-7aefcb7a09a12fae2dcbe2bc2360948aefbb66a4.zip
Add autodeclination testing - no-op right now
-rw-r--r--Tools/tests-host/Makefile11
-rw-r--r--Tools/tests-host/autodeclination_test.cpp19
-rw-r--r--Tools/tests-host/sbus2_test.cpp2
3 files changed, 29 insertions, 3 deletions
diff --git a/Tools/tests-host/Makefile b/Tools/tests-host/Makefile
index 15ccf1594..fd001e4d7 100644
--- a/Tools/tests-host/Makefile
+++ b/Tools/tests-host/Makefile
@@ -3,7 +3,7 @@ CC=g++
CFLAGS=-I. -I../../src/modules -I ../../src/include -I../../src/drivers \
-I../../src -D__EXPORT="" -Dnullptr="0" -lm
-all: mixer_test sbus2_test
+all: mixer_test sbus2_test autodeclination_test
MIXER_FILES=../../src/systemcmds/tests/test_mixer.cpp \
../../src/systemcmds/tests/test_conv.cpp \
@@ -20,13 +20,20 @@ SBUS2_FILES=../../src/modules/px4iofirmware/sbus.c \
hrt.cpp \
sbus2_test.cpp
+AUTODECLINATION_FILES=../../src/lib/geo/geo_mag_declination.c \
+ hrt.cpp \
+ autodeclination_test.cpp
+
mixer_test: $(MIXER_FILES)
$(CC) -o mixer_test $(MIXER_FILES) $(CFLAGS)
sbus2_test: $(SBUS2_FILES)
$(CC) -o sbus2_test $(SBUS2_FILES) $(CFLAGS)
+autodeclination_test: $(SBUS2_FILES)
+ $(CC) -o autodeclination_test $(SBUS2_FILES) $(CFLAGS)
+
.PHONY: clean
clean:
- rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~ mixer_test sbus2_test \ No newline at end of file
+ rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~ mixer_test sbus2_test autodeclination_test \ No newline at end of file
diff --git a/Tools/tests-host/autodeclination_test.cpp b/Tools/tests-host/autodeclination_test.cpp
new file mode 100644
index 000000000..b1b30f5d9
--- /dev/null
+++ b/Tools/tests-host/autodeclination_test.cpp
@@ -0,0 +1,19 @@
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <systemlib/mixer/mixer.h>
+#include <systemlib/err.h>
+#include <drivers/drv_hrt.h>
+#include <px4iofirmware/px4io.h>
+#include "../../src/systemcmds/tests/tests.h"
+
+int main(int argc, char *argv[]) {
+ warnx("autodeclination test started");
+
+ if (argc < 3)
+ errx(1, "Need lat/lon!");
+
+
+
+} \ No newline at end of file
diff --git a/Tools/tests-host/sbus2_test.cpp b/Tools/tests-host/sbus2_test.cpp
index 134a71b80..281903cf6 100644
--- a/Tools/tests-host/sbus2_test.cpp
+++ b/Tools/tests-host/sbus2_test.cpp
@@ -62,7 +62,7 @@ int main(int argc, char *argv[]) {
// Pipe the data into the parser
hrt_abstime now = hrt_absolute_time();
- if (partial_frame_count % 25 == 0)
+ //if (partial_frame_count % 25 == 0)
//sbus_parse(now, frame, &partial_frame_count, rc_values, &num_values, &sbus_failsafe, &sbus_frame_drop, max_channels);
}