Conditionally print PANID if successfully received

This commit is contained in:
Edvard Pettersen 2018-08-03 14:15:59 +02:00
parent c53ab05aea
commit fff8e832e2

View File

@ -233,9 +233,6 @@ platform_init_stage_three(void)
set_rf_params(); 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, LOG_DBG("With DriverLib v%u.%u\n", DRIVERLIB_RELEASE_GROUP,
DRIVERLIB_RELEASE_BUILD); DRIVERLIB_RELEASE_BUILD);
LOG_DBG("IEEE 802.15.4: %s, Sub-1 GHz: %s, BLE: %s\n", 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) #elif (RF_MODE == RF_MODE_2_4_GHZ)
LOG_INFO("Operating frequency on 2.4 GHz\n"); LOG_INFO("Operating frequency on 2.4 GHz\n");
#endif #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); LOG_INFO("Node ID: %d\n", node_id);
#if BOARD_CONF_SENSORS_ENABLE #if BOARD_CONF_SENSORS_ENABLE