GCS_MAVLink: add build_options.py option to remove rallypoint protocol

This commit is contained in:
Peter Barker 2023-08-09 18:49:16 +10:00 committed by Andrew Tridgell
parent 941e9785d4
commit 7764d1d904
3 changed files with 7 additions and 3 deletions

View File

@ -3988,7 +3988,7 @@ void GCS_MAVLINK::handle_common_message(const mavlink_message_t &msg)
break;
#endif
#if HAL_RALLY_ENABLED
#if AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED
case MAVLINK_MSG_ID_RALLY_POINT:
case MAVLINK_MSG_ID_RALLY_FETCH_POINT:
handle_common_rally_message(msg);

View File

@ -21,7 +21,7 @@
#include <AP_Rally/AP_Rally.h>
#include <AP_Logger/AP_Logger.h>
#if HAL_RALLY_ENABLED
#if AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED
void GCS_MAVLINK::handle_rally_point(const mavlink_message_t &msg) const
{
@ -105,4 +105,4 @@ void GCS_MAVLINK::handle_common_rally_message(const mavlink_message_t &msg)
break;
}
}
#endif //#if HAL_RALLY_ENABLED
#endif // AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED

View File

@ -49,3 +49,7 @@
#ifndef AP_MAVLINK_FAILURE_CREATION_ENABLED
#define AP_MAVLINK_FAILURE_CREATION_ENABLED 1
#endif
#ifndef AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED
#define AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED HAL_GCS_ENABLED && HAL_RALLY_ENABLED
#endif