From 42fa95c2d01c86b846b46b948a295c6a358063a8 Mon Sep 17 00:00:00 2001 From: jflyper Date: Tue, 20 Jun 2017 10:08:46 +0900 Subject: [PATCH] Reset bind pin when override is in effect. --- src/main/rx/spektrum.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/rx/spektrum.c b/src/main/rx/spektrum.c index 27c257850..f73e2f2a8 100644 --- a/src/main/rx/spektrum.c +++ b/src/main/rx/spektrum.c @@ -273,6 +273,16 @@ void spektrumBind(rxConfig_t *rxConfig) } + + // Release the bind pin to avoid interference with an actual rx pin, + // when rxConfig->spektrum_bind_pin_override_ioTag is used. + // This happens when the bind pin is connected in parallel to the rx pin. + + if (rxConfig->spektrum_bind_pin_override_ioTag) { + delay(50); // Keep it high for 50msec + IOConfigGPIO(bindIO, IOCFG_IN_FLOATING); + } + // If we came here as a result of hard reset (power up, with spektrum_sat_bind set), then reset it back to zero and write config // Don't reset if hardware bind plug is present // Reset only when autoreset is enabled