GCS_MAVLink: support camera-thermal-range

This commit is contained in:
Randy Mackay 2024-08-24 12:27:02 +09:00
parent d18a2b22f9
commit 2db7a9520a
2 changed files with 8 additions and 1 deletions

View File

@ -1060,7 +1060,10 @@ ap_message GCS_MAVLINK::mavlink_id_to_ap_message_id(const uint32_t mavlink_id) c
{ MAVLINK_MSG_ID_CAMERA_SETTINGS, MSG_CAMERA_SETTINGS}, { MAVLINK_MSG_ID_CAMERA_SETTINGS, MSG_CAMERA_SETTINGS},
{ MAVLINK_MSG_ID_CAMERA_FOV_STATUS, MSG_CAMERA_FOV_STATUS}, { MAVLINK_MSG_ID_CAMERA_FOV_STATUS, MSG_CAMERA_FOV_STATUS},
{ MAVLINK_MSG_ID_CAMERA_CAPTURE_STATUS, MSG_CAMERA_CAPTURE_STATUS}, { MAVLINK_MSG_ID_CAMERA_CAPTURE_STATUS, MSG_CAMERA_CAPTURE_STATUS},
#endif #if AP_CAMERA_SEND_THERMAL_RANGE_ENABLED
{ MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE, MSG_CAMERA_THERMAL_RANGE},
#endif // AP_CAMERA_SEND_THERMAL_RANGE_ENABLED
#endif // AP_CAMERA_ENABLED
#if HAL_MOUNT_ENABLED #if HAL_MOUNT_ENABLED
{ MAVLINK_MSG_ID_GIMBAL_DEVICE_ATTITUDE_STATUS, MSG_GIMBAL_DEVICE_ATTITUDE_STATUS}, { MAVLINK_MSG_ID_GIMBAL_DEVICE_ATTITUDE_STATUS, MSG_GIMBAL_DEVICE_ATTITUDE_STATUS},
{ MAVLINK_MSG_ID_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MSG_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE}, { MAVLINK_MSG_ID_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE, MSG_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE},
@ -6131,6 +6134,9 @@ bool GCS_MAVLINK::try_send_message(const enum ap_message id)
case MSG_CAMERA_FOV_STATUS: case MSG_CAMERA_FOV_STATUS:
#endif #endif
case MSG_CAMERA_CAPTURE_STATUS: case MSG_CAMERA_CAPTURE_STATUS:
#if AP_CAMERA_SEND_THERMAL_RANGE_ENABLED
case MSG_CAMERA_THERMAL_RANGE:
#endif
{ {
AP_Camera *camera = AP::camera(); AP_Camera *camera = AP::camera();
if (camera == nullptr) { if (camera == nullptr) {

View File

@ -57,6 +57,7 @@ enum ap_message : uint8_t {
MSG_CAMERA_SETTINGS, MSG_CAMERA_SETTINGS,
MSG_CAMERA_FOV_STATUS, MSG_CAMERA_FOV_STATUS,
MSG_CAMERA_CAPTURE_STATUS, MSG_CAMERA_CAPTURE_STATUS,
MSG_CAMERA_THERMAL_RANGE,
MSG_GIMBAL_DEVICE_ATTITUDE_STATUS, MSG_GIMBAL_DEVICE_ATTITUDE_STATUS,
MSG_GIMBAL_MANAGER_INFORMATION, MSG_GIMBAL_MANAGER_INFORMATION,
MSG_GIMBAL_MANAGER_STATUS, MSG_GIMBAL_MANAGER_STATUS,