diff --git a/src/modules/uORB/uORBTest_UnitTest.hpp b/src/modules/uORB/uORBTest_UnitTest.hpp index bbfa895fa6..0e68aa6c8c 100644 --- a/src/modules/uORB/uORBTest_UnitTest.hpp +++ b/src/modules/uORB/uORBTest_UnitTest.hpp @@ -35,6 +35,7 @@ #define _uORBTest_UnitTest_hpp_ #include "uORBCommon.hpp" #include "uORB.h" +#include struct orb_test { int val; @@ -92,6 +93,8 @@ int uORBTest::UnitTest::latency_test(orb_id_t T, bool print) int pfd0 = orb_advertise(T, &t); + char * const args[2] = { (char* const) this, 0 }; + pubsubtest_print = print; pubsubtest_passed = false; @@ -103,7 +106,7 @@ int uORBTest::UnitTest::latency_test(orb_id_t T, bool print) SCHED_PRIORITY_MAX - 5, 1500, (px4_main_t)&uORBTest::UnitTest::pubsubtest_threadEntry, - (char* const*) this); + args); /* give the test task some data */ while (!pubsubtest_passed) {