precland: fix landing_target_pose subscription check

This commit is contained in:
Oleg Kalachev
2018-03-27 19:06:57 +03:00
committed by Kabir Mohammed
parent fef2e2ba82
commit 749a590c1c
+1 -1
View File
@@ -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));
}