From 216ec6513a5a07d7f5aa08d8893a84b4f162906f Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Wed, 18 Jan 2017 08:58:58 -1000 Subject: [PATCH] Removed CONFIG_ARCH_BOARD_AEROFC_V1 from tap_esc Changed the CONFIG_ARCH_BOARD_AEROFC_V1 in tap_esc.cpp to TAP_ESC_NO_VERIFY_CONFIG to maintian the commitment to not have CONFIG_ARCH_BOARD_xxxx ifdef litter in the PX4 code base. TAP_ESC_NO_VERIFY_CONFIG will be removed (see todo) in aerofc-v1/board_config.h --- src/drivers/boards/aerofc-v1/board_config.h | 11 +++++++++++ src/drivers/tap_esc/tap_esc.cpp | 5 ++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/drivers/boards/aerofc-v1/board_config.h b/src/drivers/boards/aerofc-v1/board_config.h index 706d3d33a0..bd7ecc474d 100644 --- a/src/drivers/boards/aerofc-v1/board_config.h +++ b/src/drivers/boards/aerofc-v1/board_config.h @@ -129,6 +129,17 @@ #define FLASH_BASED_PARAMS +/* + * The following defined is a workaround and replaces CONFIG_ARCH_BOARD_AEROFC_V1 + * in the PX4 shared source code. #ifdef ONFIG_ARCH_BOARD_xxxx should never be added + * to the PX4 code base. Instead board_config.h should provide logical conditional + * compilation control based on features. I.E. BORD_HAS_xxxx + * See https://github.com/PX4/Firmware/pull/5893#pullrequestreview-9651688 + * todo:This and TAP_ESC_NO_VERIFY_CONFIG needs to be removed from the code base + * when final HW is debugged to dermine the root cause of ignoring the verify + */ +#define TAP_ESC_NO_VERIFY_CONFIG /* This board can not tolerated verifying the tap esc got it's config */ + __BEGIN_DECLS /**************************************************************************************************** diff --git a/src/drivers/tap_esc/tap_esc.cpp b/src/drivers/tap_esc/tap_esc.cpp index beed99684a..20ef177026 100644 --- a/src/drivers/tap_esc/tap_esc.cpp +++ b/src/drivers/tap_esc/tap_esc.cpp @@ -265,8 +265,7 @@ TAP_ESC::init() return ret; } -#ifdef CONFIG_ARCH_BOARD_AEROFC_V1 -#else +#if !defined(TAP_ESC_NO_VERIFY_CONFIG) /* Verify All ESC got the config */ @@ -313,7 +312,7 @@ TAP_ESC::init() } -#endif +#endif // /* To Unlock the ESC from the Power up state we need to issue 10 * ESCBUS_MSG_ID_RUN request with all the values 0;