From 749a590c1c35023758a29ef2cf803fc6dea91c27 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Tue, 27 Mar 2018 19:06:57 +0300 Subject: [PATCH] precland: fix landing_target_pose subscription check --- src/modules/navigator/precland.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/navigator/precland.cpp b/src/modules/navigator/precland.cpp index b45b630ab2..321b9bf76a 100644 --- a/src/modules/navigator/precland.cpp +++ b/src/modules/navigator/precland.cpp @@ -69,7 +69,7 @@ void PrecLand::on_activation() { // We need to subscribe here and not in the constructor because constructor is called before the navigator task is spawned - if (!_target_pose_sub) { + if (_target_pose_sub < 0) { _target_pose_sub = orb_subscribe(ORB_ID(landing_target_pose)); }