From fec9171d5de9c8a261a820fb08e2c4f6291293a3 Mon Sep 17 00:00:00 2001 From: nvt-se Date: Fri, 9 Apr 2010 15:47:45 +0000 Subject: [PATCH] Print the node ID instead of the first byte in the Rime address. That byte often has the value 0 when using powertrace with IPv6. --- apps/powertrace/powertrace.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/powertrace/powertrace.c b/apps/powertrace/powertrace.c index 08173cdab..3caef2eda 100644 --- a/apps/powertrace/powertrace.c +++ b/apps/powertrace/powertrace.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: powertrace.c,v 1.4 2010/03/29 21:49:07 adamdunkels Exp $ + * $Id: powertrace.c,v 1.5 2010/04/09 15:47:45 nvt-se Exp $ */ /** @@ -40,6 +40,7 @@ #include "contiki.h" #include "sys/compower.h" +#include "node-id.h" #include "powertrace.h" #include "net/rime.h" @@ -80,7 +81,7 @@ powertrace_print(char *str) printf("%s %lu P %d %lu %lu %lu %lu %lu %lu %lu (radio %d.%02d%% tx %d.%02d%% listen %d.%02d%%)\n", str, - clock_time(), rimeaddr_node_addr.u8[0], seqno++, + clock_time(), node_id, seqno++, cpu, lpm, transmit, listen, idle_transmit, idle_listen, (int)((100L * (transmit + listen)) / time), (int)((10000L * (transmit + listen) / time) - (100L * (transmit + listen) / time) * 100),