mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
GCS_MAVLink: adjust for new fields in DISTANCE_SENSOR
This commit is contained in:
parent
b867bbf5fd
commit
ea2970bf26
@ -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
|
||||
instance, // onboard ID of the sensor == instance
|
||||
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
|
||||
// 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
|
||||
PROXIMITY_SENSOR_ID_START + i, // onboard ID of the sensor
|
||||
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
|
||||
PROXIMITY_SENSOR_ID_START + PROXIMITY_MAX_DIRECTION + 1, // onboard ID of the sensor
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user