From 1c5607b42deed5e441c2c005df0bdc51e289d970 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 7 Apr 2017 17:45:10 +1000 Subject: [PATCH] AP_RPM: fixed build for aero-fc --- libraries/AP_RPM/RPM_Pin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/AP_RPM/RPM_Pin.cpp b/libraries/AP_RPM/RPM_Pin.cpp index 520a5fc038..9e975a1b63 100644 --- a/libraries/AP_RPM/RPM_Pin.cpp +++ b/libraries/AP_RPM/RPM_Pin.cpp @@ -72,6 +72,8 @@ void AP_RPM_Pin::update(void) if (last_pin != get_pin()) { last_pin = get_pin(); uint32_t gpio = 0; + +#ifdef GPIO_GPIO0_INPUT switch (last_pin) { case 50: gpio = GPIO_GPIO0_INPUT; @@ -92,7 +94,8 @@ void AP_RPM_Pin::update(void) gpio = GPIO_GPIO5_INPUT; break; } - +#endif // GPIO_GPIO5_INPUT + // uninstall old handler if installed if (last_gpio != 0) { stm32_gpiosetevent(last_gpio, false, false, false, nullptr);