summaryrefslogtreecommitdiffhomepage
path: root/digital/beacon
diff options
context:
space:
mode:
authorFlorent Duchon2012-12-18 23:26:15 +0100
committerFlorent Duchon2012-12-24 17:51:10 +0100
commitc0b390a270c9f73d8b35cb0530c0a00d19a748fd (patch)
tree462517e7432d4f73f944c4053564af0532af5191 /digital/beacon
parent9cec48f15d172d67d2c42653a145d80b1c428723 (diff)
digital/beacon: add debug network traces
Diffstat (limited to 'digital/beacon')
-rw-r--r--digital/beacon/src/network.c4
1 files changed, 3 insertions, 1 deletions
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));