Skip to content

Commit

Permalink
uORB_tests: relax latency threshold on non-realtime SITL
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Nov 20, 2024
1 parent 8e28862 commit ada2bb4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion platforms/common/uORB/uORB_tests/uORBTest_UnitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,14 @@ int uORBTest::UnitTest::pubsublatency_main()

pubsubtest_passed = true;

if (mean > 150.0f) {
#if defined(CONFIG_ARCH_BOARD_PX4_SITL)
// relaxed on SITL (non-realtime)
const float kMaxMeanUs = 1000.f; // 1000 microseconds
#else
const float kMaxMeanUs = 150.f; // 150 microseconds
#endif

if (mean > kMaxMeanUs) {
pubsubtest_res = PX4_ERROR;

} else {
Expand Down

0 comments on commit ada2bb4

Please sign in to comment.