mavlink receiver: update for new orientation convention

This commit is contained in:
ChristophTobler
2017-09-19 14:24:27 +02:00
committed by ChristophTobler
parent c315aa659e
commit 07e6738586
+4 -4
View File
@@ -737,8 +737,8 @@ MavlinkReceiver::handle_message_optical_flow_rad(mavlink_message_t *msg)
d.max_distance = 5.0f;
d.current_distance = flow.distance; /* both are in m */
d.type = 1;
d.id = MAV_DISTANCE_SENSOR_ULTRASOUND;
d.orientation = 8;
d.id = distance_sensor_s::MAV_DISTANCE_SENSOR_ULTRASOUND;
d.orientation = distance_sensor_s::ROTATION_DOWNWARD_FACING;
d.covariance = 0.0;
if (_flow_distance_sensor_pub == nullptr) {
@@ -789,9 +789,9 @@ MavlinkReceiver::handle_message_hil_optical_flow(mavlink_message_t *msg)
d.min_distance = 0.3f;
d.max_distance = 5.0f;
d.current_distance = flow.distance; /* both are in m */
d.type = 1;
d.type = distance_sensor_s::MAV_DISTANCE_SENSOR_LASER;
d.id = 0;
d.orientation = 8;
d.orientation = distance_sensor_s::ROTATION_DOWNWARD_FACING;
d.covariance = 0.0;
if (_hil_distance_sensor_pub == nullptr) {