From 8393fd4c27ddfe2380c74a8c337ef72bb0548704 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Tue, 26 Jan 2021 15:49:44 +0300 Subject: [PATCH] Fix building sitl_gazebo (#2) --- assets/patches/sitl_gazebo.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/assets/patches/sitl_gazebo.patch b/assets/patches/sitl_gazebo.patch index 4f71c65..b249c9e 100644 --- a/assets/patches/sitl_gazebo.patch +++ b/assets/patches/sitl_gazebo.patch @@ -25,6 +25,25 @@ index 050558f..7029199 100644 _send_mavlink_message(&msg, srcaddr); } +@@ -591,6 +592,7 @@ void GeotaggedImagesPlugin::_handle_storage_info(const mavlink_message_t *pMsg, + float total_mib = 0.0f; + float available_mib = 0.0f; + boost::filesystem::space_info si = boost::filesystem::space("."); ++ const std::string storage_name = "SITL Camera Storage"; + available_mib = (float)((double)si.available / (1024.0 * 1024.0)); + total_mib = (float)((double)si.capacity / (1024.0 * 1024.0)); + _send_cmd_ack(pMsg->sysid, pMsg->compid, MAV_CMD_REQUEST_STORAGE_INFORMATION, MAV_RESULT_ACCEPTED, srcaddr); +@@ -608,7 +610,9 @@ void GeotaggedImagesPlugin::_handle_storage_info(const mavlink_message_t *pMsg, + total_mib - available_mib, // used_capacity, + available_mib, + NAN, // read_speed, +- NAN // write_speed ++ NAN, // write_speed ++ STORAGE_TYPE_OTHER, // storage type ++ storage_name.c_str() // storage name + ); + _send_mavlink_message(&msg, srcaddr); + } diff --git a/src/gazebo_mavlink_interface.cpp b/src/gazebo_mavlink_interface.cpp index 5d29017..d4dd6a7 100644 --- a/src/gazebo_mavlink_interface.cpp