mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 07:53:33 +08:00
Linux: added HRT test, moved tests to linux/tests
Also fixed naming of mavlink files for NuttX build. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -38,8 +38,12 @@
|
||||
MODULE_COMMAND = mavlink_tests
|
||||
SRCS = mavlink_tests.cpp \
|
||||
mavlink_ftp_test.cpp \
|
||||
../mavlink_ftp.cpp \
|
||||
../mavlink.c
|
||||
ifeq ($(PX4_TARGET_NUTTX),nuttx)
|
||||
SRCS += ../mavlink_ftp_nuttx.cpp
|
||||
else
|
||||
SRCS += ../mavlink_ftp_linux.cpp
|
||||
endif
|
||||
|
||||
INCLUDE_DIRS += $(MAVLINK_SRC)/include/mavlink
|
||||
|
||||
|
||||
@@ -36,16 +36,17 @@
|
||||
#
|
||||
|
||||
MODULE_COMMAND = mavlink
|
||||
ifeq ($(PX$_TARGET_OS),nuttx)
|
||||
ifeq ($(PX4_TARGET_OS),nuttx)
|
||||
SRCS += mavlink_main_nuttx.cpp \
|
||||
mavlink_ftp_nuttx.cpp
|
||||
mavlink_ftp_nuttx.cpp \
|
||||
mavlink_receiver_nuttx.cpp
|
||||
else
|
||||
SRCS += mavlink_main_linux.cpp \
|
||||
mavlink_ftp_linux.cpp
|
||||
mavlink_ftp_linux.cpp \
|
||||
mavlink_receiver_linux.cpp
|
||||
endif
|
||||
|
||||
SRCS += mavlink.c \
|
||||
mavlink_receiver.cpp \
|
||||
mavlink_mission.cpp \
|
||||
mavlink_parameters.cpp \
|
||||
mavlink_orb_subscription.cpp \
|
||||
|
||||
@@ -197,7 +197,7 @@ ORBDevNode::ORBDevNode(const struct orb_metadata *meta, const char *name, const
|
||||
_priority(priority)
|
||||
{
|
||||
// enable debug() calls
|
||||
_debug_enabled = true;
|
||||
//_debug_enabled = true;
|
||||
}
|
||||
|
||||
ORBDevNode::~ORBDevNode()
|
||||
@@ -702,7 +702,7 @@ namespace
|
||||
|
||||
ORBDevMaster *g_dev;
|
||||
bool pubsubtest_passed = false;
|
||||
bool pubsubtest_print = false;
|
||||
bool pubsubtest_print = true;
|
||||
int pubsubtest_res = PX4_OK;
|
||||
|
||||
struct orb_test {
|
||||
@@ -818,7 +818,8 @@ int pubsublatency_main(void)
|
||||
|
||||
if (pubsubtest_print) {
|
||||
char fname[32];
|
||||
sprintf(fname, "/fs/microsd/timings%u.txt", timingsgroup);
|
||||
//sprintf(fname, "/fs/microsd/timings%u.txt", timingsgroup);
|
||||
sprintf(fname, "/tmp/timings%u.txt", timingsgroup);
|
||||
FILE *f = fopen(fname, "w");
|
||||
if (f == NULL) {
|
||||
warnx("Error opening file!\n");
|
||||
@@ -971,6 +972,7 @@ test()
|
||||
template<typename S> int
|
||||
latency_test(orb_id_t T, bool print)
|
||||
{
|
||||
test_note("---------------- LATENCY TEST ------------------");
|
||||
S t;
|
||||
t.val = 308;
|
||||
t.time = hrt_absolute_time();
|
||||
|
||||
Reference in New Issue
Block a user