|
|
|
@ -46,10 +46,10 @@ bool AP_RangeFinder_MAVLink::detect()
@@ -46,10 +46,10 @@ bool AP_RangeFinder_MAVLink::detect()
|
|
|
|
|
/*
|
|
|
|
|
Set the distance based on a MAVLINK message |
|
|
|
|
*/ |
|
|
|
|
void AP_RangeFinder_MAVLink::handle_msg(mavlink_message_t *msg) |
|
|
|
|
void AP_RangeFinder_MAVLink::handle_msg(const mavlink_message_t &msg) |
|
|
|
|
{ |
|
|
|
|
mavlink_distance_sensor_t packet; |
|
|
|
|
mavlink_msg_distance_sensor_decode(msg, &packet); |
|
|
|
|
mavlink_msg_distance_sensor_decode(&msg, &packet); |
|
|
|
|
|
|
|
|
|
// only accept distances for downward facing sensors
|
|
|
|
|
if (packet.orientation == MAV_SENSOR_ROTATION_PITCH_270) { |
|
|
|
|