mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 12:27:35 +08:00
mavlink_receiver: Set distance_sensor id field equal to mavlink msg
The id field should be copied from the mavlink message, not simply set to MAV_DISTANCE_SENSOR_LASER (which is 0).
This commit is contained in:
committed by
Beat Küng
parent
2c73aefafe
commit
1d3da86abb
@@ -700,7 +700,7 @@ MavlinkReceiver::handle_message_distance_sensor(mavlink_message_t *msg)
|
||||
ds.q[3] = dist_sensor.quaternion[3];
|
||||
ds.signal_quality = -1; // TODO: A dist_sensor.signal_quality field is missing from the mavlink message definition.
|
||||
ds.type = dist_sensor.type;
|
||||
ds.id = MAV_DISTANCE_SENSOR_LASER;
|
||||
ds.id = dist_sensor.id;
|
||||
ds.orientation = dist_sensor.orientation;
|
||||
|
||||
_distance_sensor_pub.publish(ds);
|
||||
|
||||
Reference in New Issue
Block a user