From 1ffc2cbe418b4dbdac64a0cb64f4014f72e3943e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 12 Jul 2019 11:38:39 +1000 Subject: [PATCH] AP_Airspeed: allow setting of default airspeed pin --- libraries/AP_Airspeed/AP_Airspeed.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_Airspeed/AP_Airspeed.cpp b/libraries/AP_Airspeed/AP_Airspeed.cpp index 75d5a8688d..6c5d53f214 100644 --- a/libraries/AP_Airspeed/AP_Airspeed.cpp +++ b/libraries/AP_Airspeed/AP_Airspeed.cpp @@ -45,8 +45,12 @@ extern const AP_HAL::HAL &hal; #define ARSPD_DEFAULT_PIN 15 #else #define ARSPD_DEFAULT_TYPE TYPE_I2C_MS4525 +#ifdef HAL_DEFAULT_AIRSPEED_PIN + #define ARSPD_DEFAULT_PIN HAL_DEFAULT_AIRSPEED_PIN +#else #define ARSPD_DEFAULT_PIN 15 #endif +#endif #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO #define PSI_RANGE_DEFAULT 0.05