mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_RangeFinder: set pin to input before attaching interrupt
this fixes input on AUX6 on CubeBlack
This commit is contained in:
parent
c18c867fec
commit
76a2cd1540
@ -91,6 +91,7 @@ void AP_RangeFinder_PWM::check_pin()
|
||||
}
|
||||
|
||||
// install interrupt handler on rising and falling edge
|
||||
hal.gpio->pinMode(state.pin, HAL_GPIO_INPUT);
|
||||
if (!hal.gpio->attach_interrupt(
|
||||
state.pin,
|
||||
FUNCTOR_BIND_MEMBER(&AP_RangeFinder_PWM::irq_handler,
|
||||
|
Loading…
Reference in New Issue
Block a user