This is an attempt to fix the test failure where PX4 detects an RC
timeout presumably because the tester process mavsdk_tests is stalled
and does not send RC control messages in time.
The imu and sensor_combined data should not be used when it has not been
updated yet, otherwise this triggers a memory sanitizer warning:
Conditional jump or move depends on uninitialised value(s)
at 0x2DA7AA: __sanitizer_cov_trace_const_cmp1 (in build/px4_sitl_default-clang/bin/px4)
by 0x3C4E79: EKF2::Run() (src/modules/ekf2/EKF2.cpp:401)
by 0x6EB881: px4::WorkQueue::Run() (platforms/common/px4_work_queue/WorkQueue.cpp:187)
by 0x6ECB9D: px4::WorkQueueRunner(void*) (platforms/common/px4_work_queue/WorkQueueManager.cpp:230)
by 0x4C07258: start_thread (in /usr/lib/libpthread-2.33.so)
by 0x4D415E2: clone (in /usr/lib/libc-2.33.so)
Conditional jump or move depends on uninitialised value(s)
at 0x3C4E7C: EKF2::Run() (src/modules/ekf2/EKF2.cpp:401)
by 0x6EB881: px4::WorkQueue::Run() (platforms/common/px4_work_queue/WorkQueue.cpp:187)
by 0x6ECB9D: px4::WorkQueueRunner(void*) (platforms/common/px4_work_queue/WorkQueueManager.cpp:230)
by 0x4C07258: start_thread (in /usr/lib/libpthread-2.33.so)
by 0x4D415E2: clone (in /usr/lib/libc-2.33.so)
- introuce slew rate limiting of airspeed setpoint (with slew rate of 1 m/s/s)
- some refactoring and clean up
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This prevents a memory sanitizer/valgrind warning:
Conditional jump or move depends on uninitialised value(s)
at 0x2DA536: __sanitizer_cov_trace_cmp4 (in build/px4_sitl_default-clang/bin/px4)
by 0x6590D8: FailureDetector::update(vehicle_status_s const&, vehicle_control_mode_s const&) (src/modules/commander/failure_detector/FailureDetector.cpp:76) by 0x3817DF: Commander::run() (src/modules/commander/Commander.cpp:2605)
by 0x38B10B: ModuleBase<Commander>::run_trampoline(int, char**) (platforms/common/include/px4_platform_common/module.h:180)
- mavlink in PX4/Firmware (395eeb440a2ca7503591f872d4f733fcd9867218): bfaf605bd6
- mavlink current upstream: 4bc0de9c38
- Changes: bfaf605bd6...4bc0de9c38
4bc0de9c 2021-12-27 olliw42 - Component Information Basics: add camera cap flag (#1752)
8035ad4d 2021-12-27 Hamish Willee - GIMBAL_DEVICE_FLAGS_NEUTRAL - note that this can be any angle (#1758)
Using make tests in docker will fail, because the current basic image used by px4io/px4-dev-simulation-bionic is ubuntu18.04, the default version of cmake is 3.10, and the add_compile_definitions command is only available in cmake 3.12+(ubuntu 20.04).