mirror of https://github.com/ArduPilot/ardupilot
AP_WheelEncoder: set pin to input before attaching interrupt
this fixes input on AUX6 on CubeBlack
This commit is contained in:
parent
0102016e54
commit
30d5ff2d3d
|
@ -48,6 +48,7 @@ void AP_WheelEncoder_Quadrature::update_pin(uint8_t &pin,
|
|||
|
||||
// install interrupt handler on rising or falling edge of gpio for pin a
|
||||
if (new_pin != (uint8_t)-1) {
|
||||
hal.gpio->pinMode(pin, HAL_GPIO_INPUT);
|
||||
if (!hal.gpio->attach_interrupt(
|
||||
pin,
|
||||
FUNCTOR_BIND_MEMBER(&AP_WheelEncoder_Quadrature::irq_handler,
|
||||
|
|
Loading…
Reference in New Issue