2022-07-14 02:23:04 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AP_HAL/AP_HAL_Boards.h>
|
2023-08-03 00:31:40 -03:00
|
|
|
#include <AP_Relay/AP_Relay_config.h>
|
2023-12-09 00:09:55 -04:00
|
|
|
#include <AP_Mission/AP_Mission_config.h>
|
2024-05-07 04:08:54 -03:00
|
|
|
#include <AP_InertialSensor/AP_InertialSensor_config.h>
|
2022-07-14 02:23:04 -03:00
|
|
|
|
|
|
|
#ifndef HAL_GCS_ENABLED
|
|
|
|
#define HAL_GCS_ENABLED 1
|
|
|
|
#endif
|
2022-10-14 21:50:49 -03:00
|
|
|
|
2023-09-27 20:33:30 -03:00
|
|
|
#ifndef HAL_MAVLINK_BINDINGS_ENABLED
|
|
|
|
#define HAL_MAVLINK_BINDINGS_ENABLED HAL_GCS_ENABLED
|
|
|
|
#endif
|
|
|
|
|
2024-06-05 21:06:21 -03:00
|
|
|
// CODE_REMOVAL
|
2022-10-14 21:50:49 -03:00
|
|
|
// BATTERY2 is slated to be removed:
|
2024-06-05 21:06:21 -03:00
|
|
|
// ArduPilot 4.6 stops compiling support in
|
|
|
|
// ArduPilot 4.7 removes the code entirely
|
2022-10-14 21:50:49 -03:00
|
|
|
#ifndef AP_MAVLINK_BATTERY2_ENABLED
|
2024-05-23 21:55:01 -03:00
|
|
|
#define AP_MAVLINK_BATTERY2_ENABLED 0
|
2022-10-14 21:50:49 -03:00
|
|
|
#endif
|
2023-03-16 03:14:28 -03:00
|
|
|
|
2023-08-01 22:44:09 -03:00
|
|
|
#ifndef HAL_HIGH_LATENCY2_ENABLED
|
|
|
|
#define HAL_HIGH_LATENCY2_ENABLED 1
|
|
|
|
#endif
|
|
|
|
|
2023-03-16 03:14:28 -03:00
|
|
|
// handling of MISSION_SET_CURRENT (the message) is slated to be
|
|
|
|
// removed. It has signficant deficiencies vs MAV_CMD_DO_SET_CURRENT.
|
|
|
|
// The command was added to the spec in January 2019 and to MAVLink in
|
|
|
|
// ArduPilot in 4.1.x
|
|
|
|
#ifndef AP_MAVLINK_MISSION_SET_CURRENT_ENABLED
|
2023-12-09 00:09:55 -04:00
|
|
|
#define AP_MAVLINK_MISSION_SET_CURRENT_ENABLED AP_MISSION_ENABLED
|
2023-03-16 03:14:28 -03:00
|
|
|
#endif
|
2022-10-26 23:46:13 -03:00
|
|
|
|
|
|
|
// AUTOPILOT_VERSION_REQUEST is slated to be removed; an instance of
|
|
|
|
// AUTOPILOT_VERSION can be requested with MAV_CMD_REQUEST_MESSAGE,
|
|
|
|
// which gets you an ACK/NACK
|
|
|
|
#ifndef AP_MAVLINK_AUTOPILOT_VERSION_REQUEST_ENABLED
|
|
|
|
#define AP_MAVLINK_AUTOPILOT_VERSION_REQUEST_ENABLED 1
|
|
|
|
#endif
|
2022-10-26 23:52:41 -03:00
|
|
|
|
2024-07-25 03:22:14 -03:00
|
|
|
#ifndef AP_MAVLINK_MSG_RC_CHANNELS_RAW_ENABLED
|
|
|
|
#define AP_MAVLINK_MSG_RC_CHANNELS_RAW_ENABLED 1
|
|
|
|
#endif
|
|
|
|
|
2022-10-26 23:52:41 -03:00
|
|
|
// handling of MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES is slated to be
|
|
|
|
// removed; the message can be requested with MAV_CMD_REQUEST_MESSAGE
|
|
|
|
#ifndef AP_MAVLINK_MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES_ENABLED
|
|
|
|
#define AP_MAVLINK_MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES_ENABLED 1
|
|
|
|
#endif
|
2023-05-14 22:44:22 -03:00
|
|
|
|
|
|
|
#ifndef HAL_MAVLINK_INTERVALS_FROM_FILES_ENABLED
|
|
|
|
#define HAL_MAVLINK_INTERVALS_FROM_FILES_ENABLED ((AP_FILESYSTEM_FATFS_ENABLED || AP_FILESYSTEM_POSIX_ENABLED) && BOARD_FLASH_SIZE > 1024)
|
|
|
|
#endif
|
|
|
|
|
2023-08-03 00:31:40 -03:00
|
|
|
#ifndef AP_MAVLINK_MSG_RELAY_STATUS_ENABLED
|
|
|
|
#define AP_MAVLINK_MSG_RELAY_STATUS_ENABLED HAL_GCS_ENABLED && AP_RELAY_ENABLED
|
|
|
|
#endif
|
2023-06-21 04:25:06 -03:00
|
|
|
|
|
|
|
// allow removal of developer-centric mavlink commands
|
|
|
|
#ifndef AP_MAVLINK_FAILURE_CREATION_ENABLED
|
|
|
|
#define AP_MAVLINK_FAILURE_CREATION_ENABLED 1
|
|
|
|
#endif
|
2023-08-09 05:49:16 -03:00
|
|
|
|
2024-06-05 20:57:52 -03:00
|
|
|
// CODE_REMOVAL
|
|
|
|
// ArduPilot 4.6 sends deprecation warnings for RALLY_POINT/RALLY_FETCH_POINT
|
|
|
|
// ArduPilot 4.7 stops compiling them in by default
|
|
|
|
// ArduPilot 4.8 removes the code entirely
|
2023-08-09 05:49:16 -03:00
|
|
|
#ifndef AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED
|
|
|
|
#define AP_MAVLINK_RALLY_POINT_PROTOCOL_ENABLED HAL_GCS_ENABLED && HAL_RALLY_ENABLED
|
|
|
|
#endif
|
2023-08-23 21:10:29 -03:00
|
|
|
|
2024-06-05 20:43:58 -03:00
|
|
|
// CODE_REMOVAL
|
|
|
|
// ArduPilot 4.5 sends deprecation warnings for MOUNT_CONTROL/MOUNT_CONFIGURE
|
|
|
|
// ArduPilot 4.6 stops compiling them in
|
|
|
|
// ArduPilot 4.7 removes the code entirely
|
2023-08-23 21:10:29 -03:00
|
|
|
#ifndef AP_MAVLINK_MSG_MOUNT_CONFIGURE_ENABLED
|
2024-06-05 20:43:58 -03:00
|
|
|
#define AP_MAVLINK_MSG_MOUNT_CONFIGURE_ENABLED 0
|
2023-08-23 21:10:29 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef AP_MAVLINK_MSG_MOUNT_CONTROL_ENABLED
|
2024-06-05 20:43:58 -03:00
|
|
|
#define AP_MAVLINK_MSG_MOUNT_CONTROL_ENABLED 0
|
2023-08-23 21:10:29 -03:00
|
|
|
#endif
|
2023-09-01 10:13:34 -03:00
|
|
|
|
|
|
|
// this is for both read and write messages:
|
|
|
|
#ifndef AP_MAVLINK_MSG_DEVICE_OP_ENABLED
|
|
|
|
#define AP_MAVLINK_MSG_DEVICE_OP_ENABLED HAL_GCS_ENABLED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef AP_MAVLINK_SERVO_RELAY_ENABLED
|
|
|
|
#define AP_MAVLINK_SERVO_RELAY_ENABLED HAL_GCS_ENABLED && AP_SERVORELAYEVENTS_ENABLED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef AP_MAVLINK_MSG_SERIAL_CONTROL_ENABLED
|
|
|
|
#define AP_MAVLINK_MSG_SERIAL_CONTROL_ENABLED HAL_GCS_ENABLED
|
|
|
|
#endif
|
2023-10-12 03:35:00 -03:00
|
|
|
|
2023-11-07 19:36:58 -04:00
|
|
|
#ifndef AP_MAVLINK_MSG_UAVIONIX_ADSB_OUT_STATUS_ENABLED
|
|
|
|
#define AP_MAVLINK_MSG_UAVIONIX_ADSB_OUT_STATUS_ENABLED HAL_ADSB_ENABLED
|
|
|
|
#endif
|
|
|
|
|
2024-02-28 22:37:25 -04:00
|
|
|
#ifndef AP_MAVLINK_FTP_ENABLED
|
|
|
|
#define AP_MAVLINK_FTP_ENABLED HAL_GCS_ENABLED
|
|
|
|
#endif
|
|
|
|
|
2023-10-12 03:35:00 -03:00
|
|
|
// GCS should be using MISSION_REQUEST_INT instead; this is a waste of
|
|
|
|
// flash. MISSION_REQUEST was deprecated in June 2020. We started
|
|
|
|
// sending warnings to the GCS in Sep 2022 if this command was used.
|
|
|
|
// Copter 4.4.0 sends this warning.
|
|
|
|
#ifndef AP_MAVLINK_MSG_MISSION_REQUEST_ENABLED
|
2024-02-13 00:07:35 -04:00
|
|
|
#define AP_MAVLINK_MSG_MISSION_REQUEST_ENABLED AP_MISSION_ENABLED
|
2023-10-12 03:35:00 -03:00
|
|
|
#endif
|
2023-11-08 06:31:03 -04:00
|
|
|
|
|
|
|
// all commands can be executed by COMMAND_INT, so COMMAND_LONG isn't
|
|
|
|
// strictly required. This option created for 4.5, Nov 2023, and code
|
|
|
|
// left in place.
|
|
|
|
#ifndef AP_MAVLINK_COMMAND_LONG_ENABLED
|
|
|
|
#define AP_MAVLINK_COMMAND_LONG_ENABLED 1
|
|
|
|
#endif
|
2024-05-07 04:08:54 -03:00
|
|
|
|
|
|
|
#ifndef AP_MAVLINK_MSG_HIGHRES_IMU_ENABLED
|
|
|
|
#define AP_MAVLINK_MSG_HIGHRES_IMU_ENABLED (BOARD_FLASH_SIZE > 1024) && AP_INERTIALSENSOR_ENABLED
|
|
|
|
#endif
|
2024-07-15 22:48:25 -03:00
|
|
|
|
|
|
|
#ifndef AP_MAVLINK_MAV_CMD_SET_HAGL_ENABLED
|
|
|
|
#define AP_MAVLINK_MAV_CMD_SET_HAGL_ENABLED (BOARD_FLASH_SIZE > 1024)
|
|
|
|
#endif
|
2024-08-08 04:21:16 -03:00
|
|
|
|
|
|
|
#ifndef AP_MAVLINK_MSG_VIDEO_STREAM_INFORMATION_ENABLED
|
|
|
|
#define AP_MAVLINK_MSG_VIDEO_STREAM_INFORMATION_ENABLED HAL_GCS_ENABLED
|
|
|
|
#endif
|