From 293f94b35527895870eca1c7aa4ff52243e6b026 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 18 Jul 2016 13:25:01 -0300 Subject: [PATCH] AP_HAL_PX4: Util: fix check for PX4_V4 When building for px4-v2 we have an warning because we are checking for the value of this undefined macro. Just change both checks to use "defined()". ../../libraries/AP_HAL_PX4/Util.cpp:115:7: warning: "CONFIG_ARCH_BOARD_PX4FMU_V4" is not defined [-Wundef] #elif CONFIG_ARCH_BOARD_PX4FMU_V4 ^ --- libraries/AP_HAL_PX4/Util.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_HAL_PX4/Util.cpp b/libraries/AP_HAL_PX4/Util.cpp index b496cda24e..37223a3034 100644 --- a/libraries/AP_HAL_PX4/Util.cpp +++ b/libraries/AP_HAL_PX4/Util.cpp @@ -108,11 +108,11 @@ bool PX4Util::get_system_id(char buf[40]) uint8_t serialid[12]; memset(serialid, 0, sizeof(serialid)); get_board_serial(serialid); -#ifdef CONFIG_ARCH_BOARD_PX4FMU_V1 +#if defined(CONFIG_ARCH_BOARD_PX4FMU_V1) const char *board_type = "PX4v1"; -#elif CONFIG_ARCH_BOARD_PX4FMU_V2 +#elif defined(CONFIG_ARCH_BOARD_PX4FMU_V2) const char *board_type = "PX4v2"; -#elif CONFIG_ARCH_BOARD_PX4FMU_V4 +#elif defined(CONFIG_ARCH_BOARD_PX4FMU_V4) const char *board_type = "PX4v4"; #else const char *board_type = "PX4v?";