diff --git a/libraries/GCS_MAVLink/GCS.h b/libraries/GCS_MAVLink/GCS.h index aff88f2437..33c5b2ea94 100644 --- a/libraries/GCS_MAVLink/GCS.h +++ b/libraries/GCS_MAVLink/GCS.h @@ -75,7 +75,7 @@ enum ap_message { MSG_BATTERY_STATUS, MSG_AOA_SSA, MSG_LANDING, - MSG_RETRY_DEFERRED // this must be last + MSG_LAST // MSG_LAST must be the last entry in this enum }; /// @@ -356,8 +356,9 @@ private: static AP_HAL::Util::perf_counter_t _perf_packet; static AP_HAL::Util::perf_counter_t _perf_update; - // deferred message handling - enum ap_message deferred_messages[MSG_RETRY_DEFERRED]; + // deferred message handling. We size the deferred_message + // ringbuffer so we can defer every message type + enum ap_message deferred_messages[MSG_LAST]; uint8_t next_deferred_message; uint8_t num_deferred_messages;