mirror of https://github.com/ArduPilot/ardupilot
AP_RangeFinder_MAVLink: only set sensor type if we accept a reading
This commit is contained in:
parent
fdd0297f12
commit
223e775a3c
|
@ -28,8 +28,8 @@ void AP_RangeFinder_MAVLink::handle_msg(const mavlink_message_t &msg)
|
|||
if (packet.orientation == MAV_SENSOR_ROTATION_PITCH_270) {
|
||||
state.last_reading_ms = AP_HAL::millis();
|
||||
distance_cm = packet.current_distance;
|
||||
sensor_type = (MAV_DISTANCE_SENSOR)packet.type;
|
||||
}
|
||||
sensor_type = (MAV_DISTANCE_SENSOR)packet.type;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue