From ccbf281137282fc98a7c4ca61fc2076f4892fbad Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Wed, 21 Jun 2017 11:38:42 +0200 Subject: [PATCH] AP_RangeFinder: allow to set rangefinder type for mavlink --- libraries/AP_RangeFinder/AP_RangeFinder_MAVLink.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_RangeFinder/AP_RangeFinder_MAVLink.cpp b/libraries/AP_RangeFinder/AP_RangeFinder_MAVLink.cpp index 3768348d05..fbc3e3cb42 100644 --- a/libraries/AP_RangeFinder/AP_RangeFinder_MAVLink.cpp +++ b/libraries/AP_RangeFinder/AP_RangeFinder_MAVLink.cpp @@ -56,6 +56,7 @@ void AP_RangeFinder_MAVLink::handle_msg(mavlink_message_t *msg) last_update_ms = AP_HAL::millis(); distance_cm = packet.current_distance; } + sensor_type = (MAV_DISTANCE_SENSOR)packet.type; } /*