From e862c349e808552263b3dc9193f86ab1ced3566b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 8 Nov 2018 15:20:17 +1100 Subject: [PATCH] AP_RPM: set pin to input before attaching interrupt this fixes input on AUX6 on CubeBlack --- libraries/AP_RPM/RPM_Pin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_RPM/RPM_Pin.cpp b/libraries/AP_RPM/RPM_Pin.cpp index 1353951cfa..79b40a9e64 100644 --- a/libraries/AP_RPM/RPM_Pin.cpp +++ b/libraries/AP_RPM/RPM_Pin.cpp @@ -60,6 +60,7 @@ void AP_RPM_Pin::update(void) // attach to new pin last_pin = get_pin(); if (last_pin) { + hal.gpio->pinMode(last_pin, HAL_GPIO_INPUT); if (!hal.gpio->attach_interrupt( last_pin, FUNCTOR_BIND_MEMBER(&AP_RPM_Pin::irq_handler, void, uint8_t, bool, uint32_t),