GCS_MAVLink: split sending terrain report from terrain request

This commit is contained in:
Peter Barker 2024-09-27 11:01:24 +10:00 committed by Andrew Tridgell
parent a401c98c74
commit 423daaa71f
2 changed files with 6 additions and 3 deletions

View File

@ -1049,8 +1049,10 @@ ap_message GCS_MAVLINK::mavlink_id_to_ap_message_id(const uint32_t mavlink_id) c
{ MAVLINK_MSG_ID_RANGEFINDER, MSG_RANGEFINDER}, { MAVLINK_MSG_ID_RANGEFINDER, MSG_RANGEFINDER},
#endif #endif
{ MAVLINK_MSG_ID_DISTANCE_SENSOR, MSG_DISTANCE_SENSOR}, { MAVLINK_MSG_ID_DISTANCE_SENSOR, MSG_DISTANCE_SENSOR},
// request also does report: #if AP_TERRAIN_AVAILABLE
{ MAVLINK_MSG_ID_TERRAIN_REQUEST, MSG_TERRAIN}, { MAVLINK_MSG_ID_TERRAIN_REQUEST, MSG_TERRAIN_REQUEST},
{ MAVLINK_MSG_ID_TERRAIN_REPORT, MSG_TERRAIN_REPORT},
#endif
#if AP_MAVLINK_BATTERY2_ENABLED #if AP_MAVLINK_BATTERY2_ENABLED
{ MAVLINK_MSG_ID_BATTERY2, MSG_BATTERY2}, { MAVLINK_MSG_ID_BATTERY2, MSG_BATTERY2},
#endif #endif

View File

@ -52,7 +52,8 @@ enum ap_message : uint8_t {
MSG_WIND, MSG_WIND,
MSG_RANGEFINDER, MSG_RANGEFINDER,
MSG_DISTANCE_SENSOR, MSG_DISTANCE_SENSOR,
MSG_TERRAIN, MSG_TERRAIN_REQUEST,
MSG_TERRAIN_REPORT,
MSG_BATTERY2, MSG_BATTERY2,
MSG_CAMERA_FEEDBACK, MSG_CAMERA_FEEDBACK,
MSG_CAMERA_INFORMATION, MSG_CAMERA_INFORMATION,