Skip to content

Commit 5269e5f

Browse files
committed
failure: unsupported unless it's PX4
1 parent 954c6c5 commit 5269e5f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/mavsdk/plugins/failure/failure_impl.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "failure_impl.h"
2+
#include "autopilot.h"
23

34
namespace mavsdk {
45

@@ -23,6 +24,12 @@ void FailureImpl::deinit() {}
2324

2425
void FailureImpl::enable()
2526
{
27+
// Only PX4 implements the SYS_FAILURE_EN param.
28+
if (_system_impl->effective_autopilot() != Autopilot::Px4) {
29+
_enabled = EnabledState::Unknown;
30+
return;
31+
}
32+
2633
constexpr auto param_name = "SYS_FAILURE_EN";
2734

2835
_system_impl->get_param_int_async(

0 commit comments

Comments
 (0)