00001 00010 /* 00011 * Copyright 2014,2015 Vladimir Ermakov. 00012 * 00013 * This file is part of the mavros package and subject to the license terms 00014 * in the top-level LICENSE file of the mavros repository. 00015 * https://github.com/mavlink/mavros/tree/master/LICENSE.md 00016 */ 00017 00018 #pragma once 00019 00020 #include <mavconn/thread_utils.h> 00021 #include <mavros_msgs/mavlink_convert.h> 00022 00023 // redeclare message at deprecated location 00024 namespace mavros { 00025 typedef mavros_msgs::Mavlink Mavlink __attribute__((deprecated)); 00026 typedef mavros_msgs::MavlinkPtr MavlinkPtr __attribute__((deprecated)); 00027 }; // namespace mavros 00028 00029 namespace mavutils { 00034 inline bool copy_ros_to_mavlink(const mavros_msgs::Mavlink::ConstPtr &rmsg, mavlink_message_t &mmsg) __attribute__((deprecated)); 00035 bool copy_ros_to_mavlink(const mavros_msgs::Mavlink::ConstPtr &rmsg, mavlink_message_t &mmsg) 00036 { 00037 return mavros_msgs::mavlink::convert(*rmsg, mmsg); 00038 }; 00039 00044 inline void copy_mavlink_to_ros(const mavlink_message_t *mmsg, mavros_msgs::MavlinkPtr &rmsg) __attribute__((deprecated)); 00045 void copy_mavlink_to_ros(const mavlink_message_t *mmsg, mavros_msgs::MavlinkPtr &rmsg) 00046 { 00047 mavros_msgs::mavlink::convert(*mmsg, *rmsg); 00048 }; 00049 }; // namespace mavutils