mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-27 02:58:31 -04:00
AP_RPM: set pin to input before attaching interrupt
this fixes input on AUX6 on CubeBlack
This commit is contained in:
parent
76a2cd1540
commit
e862c349e8
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user