This adds the env option PX4_FUZZ which runs the LLVM libFuzzer which
throws random bytes at mavlink_receiver using MAVLink messages over UDP.
The MAVLink messages that are being sent are valid, so the CRC is
calculated but the payload and msgid, etc. are generally garbage, unless
the fuzzing gets a msgid right by chance.
As I understand it, libFuzzer watches the test coverage and will try to
execute as much of the code as possible.
- sensors/vehicle_imu: reset learned cal on any calibration change
during parameter update
- sensors/vehicle_imu: cleanup logic estimated bias -> calibration offset
saving
- don't invalidate saved calibration (the point is to keep the last valid)
- remove old debug code, etc
- sensors/vehicle_imu: notify parameter changes if accel or gyro
calibration has changed
- lib/sensor_calibration: add calibrated() and calibration_index()
getters, keep Accelerometer/Gyroscope/Magnetometer in sync
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)