Copter: free allocations in case of allocation failure
[ardupilot.git] / libraries / AP_RCProtocol / AP_RCProtocol_config.h
blob4cb2b65124611032c5dc04968de03e7d3ac18701
1 #pragma once
3 #include <AP_HAL/AP_HAL_Boards.h>
4 #include <AP_Frsky_Telem/AP_Frsky_config.h>
5 #include <GCS_MAVLink/GCS_config.h>
6 #include <AP_Radio/AP_Radio_config.h>
8 #ifndef AP_RCPROTOCOL_ENABLED
9 #define AP_RCPROTOCOL_ENABLED 1
10 #endif
12 #ifndef AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
13 #define AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED AP_RCPROTOCOL_ENABLED
14 #endif
16 #ifndef AP_RCPROTOCOL_CRSF_ENABLED
17 #define AP_RCPROTOCOL_CRSF_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
18 #endif
20 #ifndef AP_RCPROTOCOL_DRONECAN_ENABLED
21 #define AP_RCPROTOCOL_DRONECAN_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED && HAL_ENABLE_DRONECAN_DRIVERS
22 #endif
24 #ifndef AP_RCPROTOCOL_DSM_ENABLED
25 #define AP_RCPROTOCOL_DSM_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
26 #endif
28 #ifndef AP_RCPROTOCOL_FPORT_ENABLED
29 #define AP_RCPROTOCOL_FPORT_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
30 #endif
31 #ifndef AP_RCPROTOCOL_FPORT2_ENABLED
32 #define AP_RCPROTOCOL_FPORT2_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED && AP_FRSKY_SPORT_TELEM_ENABLED
33 #endif
35 #ifndef AP_RCPROTOCOL_IBUS_ENABLED
36 #define AP_RCPROTOCOL_IBUS_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
37 #endif
39 #ifndef AP_RCPROTOCOL_JOYSTICK_SFML_ENABLED
40 #define AP_RCPROTOCOL_JOYSTICK_SFML_ENABLED defined(SFML_JOYSTICK)
41 #endif
43 #ifndef AP_RCPROTOCOL_PPMSUM_ENABLED
44 #define AP_RCPROTOCOL_PPMSUM_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
45 #endif
47 #ifndef AP_RCPROTOCOL_RADIO_ENABLED
48 #define AP_RCPROTOCOL_RADIO_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED && AP_RADIO_ENABLED
49 #endif
51 #ifndef AP_RCPROTOCOL_SBUS_ENABLED
52 #define AP_RCPROTOCOL_SBUS_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
53 #endif
55 #ifndef AP_RCPROTOCOL_SRXL_ENABLED
56 #define AP_RCPROTOCOL_SRXL_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
57 #endif
59 #ifndef AP_RCPROTOCOL_SRXL2_ENABLED
60 #define AP_RCPROTOCOL_SRXL2_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
61 #endif
63 #ifndef AP_RCPROTOCOL_ST24_ENABLED
64 #define AP_RCPROTOCOL_ST24_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
65 #endif
67 #ifndef AP_RCPROTOCOL_SUMD_ENABLED
68 #define AP_RCPROTOCOL_SUMD_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
69 #endif
71 #ifndef AP_RCPROTOCOL_SBUS_NI_ENABLED
72 #define AP_RCPROTOCOL_SBUS_NI_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED && AP_RCPROTOCOL_SBUS_ENABLED
73 #endif
75 #ifndef AP_RCPROTOCOL_FASTSBUS_ENABLED
76 #define AP_RCPROTOCOL_FASTSBUS_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED && AP_RCPROTOCOL_SBUS_ENABLED
77 #endif
79 #ifndef AP_RCPROTOCOL_GHST_ENABLED
80 #define AP_RCPROTOCOL_GHST_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED
81 #endif
83 #ifndef AP_RCPROTOCOL_MAVLINK_RADIO_ENABLED
84 #define AP_RCPROTOCOL_MAVLINK_RADIO_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED && BOARD_FLASH_SIZE > 1024 && HAL_GCS_ENABLED
85 #endif
87 #ifndef AP_RCPROTOCOL_UDP_ENABLED
88 #define AP_RCPROTOCOL_UDP_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED && (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
89 #endif
91 #ifndef AP_RCPROTOCOL_FDM_ENABLED
92 #define AP_RCPROTOCOL_FDM_ENABLED AP_RCPROTOCOL_BACKEND_DEFAULT_ENABLED && (CONFIG_HAL_BOARD == HAL_BOARD_SITL)
93 #endif