Copter: pass DISTANCE_SENSOR messages to rangefinders

This allows the MAVLink range finder driver to intercept distance measurements
This commit is contained in:
Allan Matthew 2016-05-04 12:03:56 +09:00 committed by Randy Mackay
parent d3831e4a5d
commit 7960e3bb8f
1 changed files with 7 additions and 0 deletions

View File

@ -1791,6 +1791,13 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg)
break;
}
case MAVLINK_MSG_ID_DISTANCE_SENSOR:
{
result = MAV_RESULT_ACCEPTED;
copter.sonar.handle_msg(msg);
break;
}
#if HIL_MODE != HIL_MODE_DISABLED
case MAVLINK_MSG_ID_HIL_STATE: // MAV ID: 90
{