diff --git a/ROMFS/px4fmu_common/init.d-posix/rcS b/ROMFS/px4fmu_common/init.d-posix/rcS index 882e408250..d9e4d76693 100644 --- a/ROMFS/px4fmu_common/init.d-posix/rcS +++ b/ROMFS/px4fmu_common/init.d-posix/rcS @@ -154,6 +154,8 @@ param set-default SDLOG_DIRS_MAX 7 param set-default TRIG_INTERFACE 3 +param set-default SYS_FAILURE_EN 1 + # Adapt timeout parameters if simulation runs faster or slower than realtime. if [ -n "$PX4_SIM_SPEED_FACTOR" ]; then COM_DL_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 10" | bc) diff --git a/test/mavsdk_tests/autopilot_tester.h b/test/mavsdk_tests/autopilot_tester.h index 42102c4c30..941e09cbab 100644 --- a/test/mavsdk_tests/autopilot_tester.h +++ b/test/mavsdk_tests/autopilot_tester.h @@ -139,6 +139,11 @@ public: // Blocking call to get the drone's current position in NED frame std::array get_current_position_ned(); + void set_param_int(const std::string ¶m, int32_t value) + { + CHECK(_param->set_param_int(param, value) == Param::Result::Success); + } + protected: mavsdk::Param *getParams() const { return _param.get();} mavsdk::Telemetry *getTelemetry() const { return _telemetry.get();} diff --git a/test/mavsdk_tests/test_multicopter_failure_injection.cpp b/test/mavsdk_tests/test_multicopter_failure_injection.cpp index f2337ceee2..d8fcd4b5ee 100644 --- a/test/mavsdk_tests/test_multicopter_failure_injection.cpp +++ b/test/mavsdk_tests/test_multicopter_failure_injection.cpp @@ -41,6 +41,7 @@ TEST_CASE("Failure Injection - Reject mid-air when it is disabled", "[multicopte AutopilotTesterFailure tester; tester.connect(connection_url); tester.wait_until_ready(); + tester.set_param_int("SYS_FAILURE_EN", 0); tester.arm(); tester.takeoff(); tester.wait_until_hovering();