Skip to content

Commit

Permalink
Revert "capabilites won't report distance sensor unless we got data"
Browse files Browse the repository at this point in the history
This reverts commit 0e6b3eb.
  • Loading branch information
klaxalk committed Jan 29, 2024
1 parent 0e6b3eb commit d0ef05c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,9 @@ mrs_msgs::HwApiStatus MrsUavPx4Api::getStatus() {

mrs_msgs::HwApiCapabilities MrsUavPx4Api::getCapabilities() {

auto capabilities = _capabilities_;
_capabilities_.stamp = ros::Time::now();

capabilities.stamp = ros::Time::now();

if (capabilities.produces_distance_sensor && !sh_mavros_distance_sensor_.hasMsg()) {
capabilities.produces_distance_sensor = false;
}

return capabilities;
return _capabilities_;
}

//}
Expand Down

0 comments on commit d0ef05c

Please sign in to comment.