File tree Expand file tree Collapse file tree 4 files changed +12
-0
lines changed
Expand file tree Collapse file tree 4 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -402,12 +402,14 @@ class GCS_MAVLINK
402402 void send_uavionix_adsb_out_status () const ;
403403 void send_autopilot_state_for_gimbal_device () const ;
404404
405+ #if AP_MAVLINK_MSG_FLIGHT_INFORMATION_ENABLED
405406 struct {
406407 MAV_LANDED_STATE last_landed_state;
407408 uint32_t takeoff_time_ms;
408409 } flight_info;
409410
410411 void send_flight_information ();
412+ #endif
411413
412414 // lock a channel, preventing use by MAVLink
413415 void lock (bool _lock) {
Original file line number Diff line number Diff line change @@ -5960,6 +5960,7 @@ void GCS_MAVLINK::send_autopilot_state_for_gimbal_device() const
59605960#endif // AP_AHRS_ENABLED
59615961}
59625962
5963+ #if AP_MAVLINK_MSG_FLIGHT_INFORMATION_ENABLED
59635964void GCS_MAVLINK::send_flight_information ()
59645965{
59655966 const uint32_t time_boot_ms = AP_HAL::millis ();
@@ -6002,6 +6003,7 @@ void GCS_MAVLINK::send_flight_information()
60026003 flight_uuid
60036004 );
60046005}
6006+ #endif // AP_MAVLINK_MSG_FLIGHT_INFORMATION_ENABLED
60056007
60066008void GCS_MAVLINK::send_received_message_deprecation_warning (const char * message)
60076009{
@@ -6431,10 +6433,12 @@ bool GCS_MAVLINK::try_send_message(const enum ap_message id)
64316433 break ;
64326434#endif
64336435
6436+ #if AP_MAVLINK_MSG_FLIGHT_INFORMATION_ENABLED
64346437 case MSG_FLIGHT_INFORMATION:
64356438 CHECK_PAYLOAD_SIZE (FLIGHT_INFORMATION);
64366439 send_flight_information ();
64376440 break ;
6441+ #endif
64386442
64396443 default :
64406444 // try_send_message must always at some stage return true for
Original file line number Diff line number Diff line change 131131#ifndef AP_MAVLINK_MAV_CMD_SET_HAGL_ENABLED
132132#define AP_MAVLINK_MAV_CMD_SET_HAGL_ENABLED (BOARD_FLASH_SIZE > 1024)
133133#endif
134+
135+ #ifndef AP_MAVLINK_MSG_FLIGHT_INFORMATION_ENABLED
136+ #define AP_MAVLINK_MSG_FLIGHT_INFORMATION_ENABLED 1
137+ #endif
Original file line number Diff line number Diff line change @@ -97,6 +97,8 @@ enum ap_message : uint8_t {
9797#if AP_MAVLINK_MSG_HIGHRES_IMU_ENABLED
9898 MSG_HIGHRES_IMU ,
9999#endif
100+ #if AP_MAVLINK_MSG_FLIGHT_INFORMATION_ENABLED
100101 MSG_FLIGHT_INFORMATION ,
102+ #endif
101103 MSG_LAST // MSG_LAST must be the last entry in this enum
102104};
You can’t perform that action at this time.
0 commit comments