Skip to content

Commit

Permalink
Velocity limit: remove duplicate message and if(true)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaEtUgR committed Dec 5, 2023
1 parent c1c99eb commit 53674a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
8 changes: 0 additions & 8 deletions msg/velocity_limits.msg

This file was deleted.

14 changes: 6 additions & 8 deletions src/modules/mavlink/mavlink_receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1220,14 +1220,12 @@ void MavlinkReceiver::handle_message_set_velocity_limits(mavlink_message_t *msg)
mavlink_set_velocity_limits_t mavlink_set_velocity_limits;
mavlink_msg_set_velocity_limits_decode(msg, &mavlink_set_velocity_limits);

if (true) {
velocity_limits_s velocity_limits{};
velocity_limits.horizontal_velocity = mavlink_set_velocity_limits.horizontal_speed_limit;
velocity_limits.vertical_velocity = mavlink_set_velocity_limits.vertical_speed_limit;
velocity_limits.yaw_rate = mavlink_set_velocity_limits.yaw_rate_limit;
velocity_limits.timestamp = hrt_absolute_time();
_velocity_limits_pub.publish(velocity_limits);
}
velocity_limits_s velocity_limits{};
velocity_limits.horizontal_velocity = mavlink_set_velocity_limits.horizontal_speed_limit;
velocity_limits.vertical_velocity = mavlink_set_velocity_limits.vertical_speed_limit;
velocity_limits.yaw_rate = mavlink_set_velocity_limits.yaw_rate_limit;
velocity_limits.timestamp = hrt_absolute_time();
_velocity_limits_pub.publish(velocity_limits);
}

void
Expand Down

0 comments on commit 53674a7

Please sign in to comment.