GCS_MAVLink: adjust for new fields in DISTANCE_SENSOR

This commit is contained in:
Andrew Tridgell 2019-01-17 07:49:14 +11:00
parent b867bbf5fd
commit ea2970bf26

View File

@ -273,7 +273,10 @@ void GCS_MAVLINK::send_distance_sensor(const AP_RangeFinder_Backend *sensor, con
sensor->get_mav_distance_sensor_type(), // type from MAV_DISTANCE_SENSOR enum sensor->get_mav_distance_sensor_type(), // type from MAV_DISTANCE_SENSOR enum
instance, // onboard ID of the sensor == instance instance, // onboard ID of the sensor == instance
sensor->orientation(), // direction the sensor faces from MAV_SENSOR_ORIENTATION enum sensor->orientation(), // direction the sensor faces from MAV_SENSOR_ORIENTATION enum
0); // Measurement covariance in centimeters, 0 for unknown / invalid readings 0, // Measurement covariance in centimeters, 0 for unknown / invalid readings
0, // horizontal FOV
0, // vertical FOV
(const float *)nullptr); // quaternion of sensor orientation for MAV_SENSOR_ROTATION_CUSTOM
} }
// send any and all distance_sensor messages. This starts by sending // send any and all distance_sensor messages. This starts by sending
// any distance sensors not used by a Proximity sensor, then sends the // any distance sensors not used by a Proximity sensor, then sends the
@ -357,7 +360,8 @@ void GCS_MAVLINK::send_proximity() const
MAV_DISTANCE_SENSOR_LASER, // type from MAV_DISTANCE_SENSOR enum MAV_DISTANCE_SENSOR_LASER, // type from MAV_DISTANCE_SENSOR enum
PROXIMITY_SENSOR_ID_START + i, // onboard ID of the sensor PROXIMITY_SENSOR_ID_START + i, // onboard ID of the sensor
dist_array.orientation[i], // direction the sensor faces from MAV_SENSOR_ORIENTATION enum dist_array.orientation[i], // direction the sensor faces from MAV_SENSOR_ORIENTATION enum
0); // Measurement covariance in centimeters, 0 for unknown / invalid readings 0, // Measurement covariance in centimeters, 0 for unknown / invalid readings
0, 0, nullptr);
} }
} }
@ -376,7 +380,8 @@ void GCS_MAVLINK::send_proximity() const
MAV_DISTANCE_SENSOR_LASER, // type from MAV_DISTANCE_SENSOR enum MAV_DISTANCE_SENSOR_LASER, // type from MAV_DISTANCE_SENSOR enum
PROXIMITY_SENSOR_ID_START + PROXIMITY_MAX_DIRECTION + 1, // onboard ID of the sensor PROXIMITY_SENSOR_ID_START + PROXIMITY_MAX_DIRECTION + 1, // onboard ID of the sensor
MAV_SENSOR_ROTATION_PITCH_90, // direction upwards MAV_SENSOR_ROTATION_PITCH_90, // direction upwards
0); // Measurement covariance in centimeters, 0 for unknown / invalid readings 0, // Measurement covariance in centimeters, 0 for unknown / invalid readings
0, 0, nullptr);
} }
} }