From c0b390a270c9f73d8b35cb0530c0a00d19a748fd Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Tue, 18 Dec 2012 23:26:15 +0100 Subject: digital/beacon: add debug network traces --- digital/beacon/src/network.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/digital/beacon/src/network.c b/digital/beacon/src/network.c index 84d7d785..71f03cf6 100644 --- a/digital/beacon/src/network.c +++ b/digital/beacon/src/network.c @@ -48,6 +48,7 @@ AppMessageBuffer_t zigbit_tx_buffer; extern AppState_t appState; extern DeviceType_t deviceType; +extern uint8_t debug_network; // Leave request, used for router to leave the network when communication was interrupted static ZDO_ZdpReq_t leaveReq; @@ -329,7 +330,8 @@ void APS_DataIndication(APS_DataInd_t* indData) angle = ((appMessage->data[NETWORK_MSG_DATA_MSB_FIELD]&0x01) << 8) + appMessage->data[NETWORK_MSG_DATA_LSB_FIELD]; /* For debug */ - uprintf("[%d] angle[%d] = %f\r\n",beacon,angle_id,codewheel_convert_angle_raw2degrees(angle)); + if(debug_network == 1) + uprintf("[%d] angle[%d] = %f\r\n",beacon,angle_id,codewheel_convert_angle_raw2degrees(angle)); /* New angle is avaiiable, update position */ update_position(beacon,angle_id,codewheel_convert_angle_raw2radians(angle)); -- cgit v1.2.3