You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2018/03/12 13:38:02 UTC

[mynewt-nimble] 28/32: nimble/dtm: Allow for being late on RX start timer

This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch new-master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit b35de4c81e3044b440758e94efc205ec3a712a27
Author: Ɓukasz Rymanowski <lu...@codecoup.pl>
AuthorDate: Fri Mar 2 11:48:58 2018 +0100

    nimble/dtm: Allow for being late on RX start timer
    
    So far we assert when being late or starting RX timer. Now we allow to
    be late as it is not important for dtm code. RX is still on after it.
    
    X-Original-Commit: dc600a051f11e3c9f31e93fdd45e63c659c3c8c4
---
 nimble/controller/src/ble_ll_dtm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/nimble/controller/src/ble_ll_dtm.c b/nimble/controller/src/ble_ll_dtm.c
index 23a5cfc..e014d24 100644
--- a/nimble/controller/src/ble_ll_dtm.c
+++ b/nimble/controller/src/ble_ll_dtm.c
@@ -311,7 +311,9 @@ ble_ll_dtm_rx_start(void)
 
     rc = ble_phy_setchan(channel_rf_to_index[g_ble_ll_dtm_ctx.rf_channel],
                          BLE_DTM_SYNC_WORD, BLE_DTM_CRC);
-    assert(rc == 0);
+    if (rc) {
+        return rc;
+    }
 
 #if (MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_2M_PHY) || MYNEWT_VAL(BLE_LL_CFG_FEAT_LE_CODED_PHY))
     ble_phy_mode_set(g_ble_ll_dtm_ctx.phy_mode, g_ble_ll_dtm_ctx.phy_mode);
@@ -319,7 +321,9 @@ ble_ll_dtm_rx_start(void)
 
     rc = ble_phy_rx_set_start_time(os_cputime_get32() +
                                    g_ble_ll_sched_offset_ticks, 0);
-    assert(rc == 0);
+    if (rc && rc != BLE_PHY_ERR_RX_LATE) {
+        return rc;
+    }
 
     ble_ll_state_set(BLE_LL_STATE_DTM);
 

-- 
To stop receiving notification emails like this one, please contact
andk@apache.org.