Rimestats bugfix: only compile the rimestats printout if rimestats are enabled

This commit is contained in:
Adam Dunkels 2013-03-17 10:50:28 +01:00
parent f5a1ffa90d
commit ef25cc6c58

View File

@ -55,6 +55,7 @@
void
print_stats(void)
{
#if RIMESTATS_CONF_ENABLED
PRINTA("S %d.%d clock %lu tx %lu rx %lu rtx %lu rrx %lu rexmit %lu acktx %lu noacktx %lu ackrx %lu timedout %lu badackrx %lu toolong %lu tooshort %lu badsynch %lu badcrc %lu contentiondrop %lu sendingdrop %lu lltx %lu llrx %lu\n",
rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1],
clock_seconds(),
@ -66,6 +67,7 @@ print_stats(void)
rimestats.badsynch, rimestats.badcrc,
rimestats.contentiondrop, rimestats.sendingdrop,
rimestats.lltx, rimestats.llrx);
#endif /* RIMESTATS_CONF_ENABLED */
#if ENERGEST_CONF_ON
PRINTA("E %d.%d clock %lu cpu %lu lpm %lu irq %lu gled %lu yled %lu rled %lu tx %lu listen %lu sensors %lu serial %lu\n",
rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1],