GCS_MAVLINK: convert APM_BUILD_COPTER_OR_HELI() to APM_BUILD_COPTER_OR_HELI

This commit is contained in:
Andy Piper 2021-10-25 18:05:56 +01:00 committed by Andrew Tridgell
parent f9b6934d7d
commit 008c61215c

View File

@ -68,7 +68,7 @@
#include <AP_Common/AP_Common.h> #include <AP_Common/AP_Common.h>
// To be replaced with macro saying if KDECAN library is included // To be replaced with macro saying if KDECAN library is included
#if APM_BUILD_COPTER_OR_HELI() || APM_BUILD_TYPE(APM_BUILD_ArduPlane) || APM_BUILD_TYPE(APM_BUILD_ArduSub) #if APM_BUILD_COPTER_OR_HELI || APM_BUILD_TYPE(APM_BUILD_ArduPlane) || APM_BUILD_TYPE(APM_BUILD_ArduSub)
#include <AP_KDECAN/AP_KDECAN.h> #include <AP_KDECAN/AP_KDECAN.h>
#endif #endif
#include <AP_ToshibaCAN/AP_ToshibaCAN.h> #include <AP_ToshibaCAN/AP_ToshibaCAN.h>
@ -3910,7 +3910,7 @@ MAV_RESULT GCS_MAVLINK::handle_command_preflight_can(const mavlink_command_long_
switch (AP::can().get_driver_type(i)) { switch (AP::can().get_driver_type(i)) {
case AP_CANManager::Driver_Type_KDECAN: { case AP_CANManager::Driver_Type_KDECAN: {
// To be replaced with macro saying if KDECAN library is included // To be replaced with macro saying if KDECAN library is included
#if APM_BUILD_COPTER_OR_HELI() || APM_BUILD_TYPE(APM_BUILD_ArduPlane) || APM_BUILD_TYPE(APM_BUILD_ArduSub) #if APM_BUILD_COPTER_OR_HELI || APM_BUILD_TYPE(APM_BUILD_ArduPlane) || APM_BUILD_TYPE(APM_BUILD_ArduSub)
AP_KDECAN *ap_kdecan = AP_KDECAN::get_kdecan(i); AP_KDECAN *ap_kdecan = AP_KDECAN::get_kdecan(i);
if (ap_kdecan != nullptr) { if (ap_kdecan != nullptr) {
@ -3924,7 +3924,7 @@ MAV_RESULT GCS_MAVLINK::handle_command_preflight_can(const mavlink_command_long_
} }
case AP_CANManager::Driver_Type_CANTester: { case AP_CANManager::Driver_Type_CANTester: {
// To be replaced with macro saying if KDECAN library is included // To be replaced with macro saying if KDECAN library is included
#if (APM_BUILD_COPTER_OR_HELI() || APM_BUILD_TYPE(APM_BUILD_ArduPlane) || APM_BUILD_TYPE(APM_BUILD_ArduSub)) && (HAL_MAX_CAN_PROTOCOL_DRIVERS > 1 && !HAL_MINIMIZE_FEATURES) #if (APM_BUILD_COPTER_OR_HELI || APM_BUILD_TYPE(APM_BUILD_ArduPlane) || APM_BUILD_TYPE(APM_BUILD_ArduSub)) && (HAL_MAX_CAN_PROTOCOL_DRIVERS > 1 && !HAL_MINIMIZE_FEATURES)
CANTester *cantester = CANTester::get_cantester(i); CANTester *cantester = CANTester::get_cantester(i);
if (cantester != nullptr) { if (cantester != nullptr) {