[radio] wait before testing if spektrum receiver should enter bind mode

This commit is contained in:
Gautier Hattenberger
2018-01-18 17:42:03 +01:00
parent 2a26cdfc6d
commit 90c2c33b02
@@ -759,6 +759,8 @@ void radio_control_spektrum_try_bind(void) {
*/
gpio_setup_input_pulldown(SPEKTRUM_BIND_PIN_PORT, SPEKTRUM_BIND_PIN);
sys_time_usleep(10); // wait for electrical level to stabilize
/* exit if the BIND_PIN is low, it needs to
be pulled high at startup to initiate bind */
if (gpio_get(SPEKTRUM_BIND_PIN_PORT, SPEKTRUM_BIND_PIN) == 0) {
@@ -771,6 +773,8 @@ void radio_control_spektrum_try_bind(void) {
*/
gpio_setup_input_pullup(SPEKTRUM_BIND_PIN_PORT, SPEKTRUM_BIND_PIN);
sys_time_usleep(10); // wait for electrical level to stabilize
/* exit if the BIND_PIN is high, it needs to
be pulled low at startup to initiate bind */
if (gpio_get(SPEKTRUM_BIND_PIN_PORT, SPEKTRUM_BIND_PIN) != 0) {