Skip to content

Commit

Permalink
VtolLandDetector require vehicle_status timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Mar 5, 2018
1 parent 354584a commit 493c41c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/land_detector/VtolLandDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void VtolLandDetector::_update_topics()
bool VtolLandDetector::_get_maybe_landed_state()
{
// Only trigger in RW mode
if (!_vehicle_status.is_rotary_wing) {
if ((_vehicle_status.timestamp != 0) && !_vehicle_status.is_rotary_wing) {
return false;
}

Expand All @@ -80,7 +80,7 @@ bool VtolLandDetector::_get_maybe_landed_state()
bool VtolLandDetector::_get_landed_state()
{
// Only trigger in RW mode
if (!_vehicle_status.is_rotary_wing) {
if ((_vehicle_status.timestamp != 0) && !_vehicle_status.is_rotary_wing) {
return false;
}

Expand Down

0 comments on commit 493c41c

Please sign in to comment.