From fff8e832e27ffb3a508007a2cd222cf49df8b296 Mon Sep 17 00:00:00 2001 From: Edvard Pettersen Date: Fri, 3 Aug 2018 14:15:59 +0200 Subject: [PATCH] Conditionally print PANID if successfully received --- arch/platform/simplelink/cc13xx-cc26xx/platform.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/platform/simplelink/cc13xx-cc26xx/platform.c b/arch/platform/simplelink/cc13xx-cc26xx/platform.c index 50b8ad2c8..c78fe1946 100644 --- a/arch/platform/simplelink/cc13xx-cc26xx/platform.c +++ b/arch/platform/simplelink/cc13xx-cc26xx/platform.c @@ -233,9 +233,6 @@ platform_init_stage_three(void) set_rf_params(); - NETSTACK_RADIO.get_value(RADIO_PARAM_CHANNEL, &chan); - NETSTACK_RADIO.get_value(RADIO_PARAM_PAN_ID, &pan); - LOG_DBG("With DriverLib v%u.%u\n", DRIVERLIB_RELEASE_GROUP, DRIVERLIB_RELEASE_BUILD); LOG_DBG("IEEE 802.15.4: %s, Sub-1 GHz: %s, BLE: %s\n", @@ -248,7 +245,15 @@ platform_init_stage_three(void) #elif (RF_MODE == RF_MODE_2_4_GHZ) LOG_INFO("Operating frequency on 2.4 GHz\n"); #endif - LOG_INFO("RF: Channel %d, PANID 0x%04X\n", chan, pan); + + NETSTACK_RADIO.get_value(RADIO_PARAM_CHANNEL, &chan); + LOG_INFO("RF: Channel %d", chan); + + if(NETSTACK_RADIO.get_value(RADIO_PARAM_PAN_ID, &pan) == RADIO_RESULT_OK) { + LOG_INFO(", PANID 0x%04X", pan); + } + LOG_INFO("\n"); + LOG_INFO("Node ID: %d\n", node_id); #if BOARD_CONF_SENSORS_ENABLE