From 792746f7758597142fb5e1f08de54206d68b50f4 Mon Sep 17 00:00:00 2001 From: Vladimir Zidar Date: Thu, 27 Apr 2017 15:44:39 +0200 Subject: [PATCH] LP-480 DSM: do not fail to initialize driver for ports without bind capability. --- flight/pios/common/pios_dsm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/flight/pios/common/pios_dsm.c b/flight/pios/common/pios_dsm.c index 9f66a1aff..a935e22c3 100644 --- a/flight/pios/common/pios_dsm.c +++ b/flight/pios/common/pios_dsm.c @@ -318,11 +318,9 @@ int32_t PIOS_DSM_Init(uint32_t *dsm_id, PIOS_DEBUG_Assert(driver->ioctl); - if ((driver->ioctl)(lower_id, PIOS_IOCTL_USART_GET_DSMBIND, &rxpin) < 0) { - return -1; + if ((driver->ioctl)(lower_id, PIOS_IOCTL_USART_GET_DSMBIND, &rxpin) == 0) { + PIOS_DSM_Bind(&rxpin, bind); } - - PIOS_DSM_Bind(&rxpin, bind); } PIOS_DSM_ResetState(dsm_dev);