From 1c4af66c3af0fbe11918892f0a23b0fc41492910 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 19 Jun 2015 15:30:44 +0200 Subject: [PATCH 1/2] ng_icmpv6_echo: fix time output on shell command --- sys/shell/commands/sc_icmpv6_echo.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sys/shell/commands/sc_icmpv6_echo.c b/sys/shell/commands/sc_icmpv6_echo.c index c1a1ab1f29..3fb2818c98 100644 --- a/sys/shell/commands/sc_icmpv6_echo.c +++ b/sys/shell/commands/sc_icmpv6_echo.c @@ -84,7 +84,9 @@ int _handle_reply(ng_pktsnip_t *pkt, uint64_t time) " time = %" PRIu32 ".%03" PRIu32 " ms\n", (unsigned) icmpv6->size, ng_ipv6_addr_to_str(ipv6_str, &(ipv6_hdr->src), sizeof(ipv6_str)), byteorder_ntohs(icmpv6_hdr->id), byteorder_ntohs(icmpv6_hdr->seq), - ipv6_hdr->hl, rt.seconds, rt.microseconds); + ipv6_hdr->hl, + (rt.seconds * SEC_IN_MS) + (rt.microseconds / MS_IN_USEC), + rt.microseconds % MS_IN_USEC); ng_ipv6_nc_still_reachable(&ipv6_hdr->src); } else { @@ -216,17 +218,21 @@ int _icmpv6_ping(int argc, char **argv) printf("--- %s ping statistics ---\n", addr_str); if (success > 0) { + timex_normalize(&sum_rtt); printf("%d packets transmitted, %d received, %d%% packet loss, time %" - PRIu32 ".03%" PRIu32 " s\n", n, success, (success - n) / n, + PRIu32 ".06%" PRIu32 " s\n", n, success, (success - n) / n, sum_rtt.seconds, sum_rtt.microseconds); timex_t avg_rtt = timex_from_uint64(timex_uint64(sum_rtt) / n); /* get average */ printf("rtt min/avg/max = " "%" PRIu32 ".%03" PRIu32 "/" "%" PRIu32 ".%03" PRIu32 "/" "%" PRIu32 ".%03" PRIu32 " ms\n", - min_rtt.seconds, min_rtt.microseconds, - avg_rtt.seconds, avg_rtt.microseconds, - max_rtt.seconds, max_rtt.microseconds); + (min_rtt.seconds * SEC_IN_MS) + (min_rtt.seconds / MS_IN_USEC), + min_rtt.microseconds % MS_IN_USEC, + (avg_rtt.seconds * SEC_IN_MS) + (avg_rtt.seconds / MS_IN_USEC), + avg_rtt.microseconds % MS_IN_USEC, + (max_rtt.seconds * SEC_IN_MS) + (max_rtt.seconds / MS_IN_USEC), + max_rtt.microseconds % MS_IN_USEC); } else { printf("%d packets transmitted, 0 received, 100%% packet loss\n", n); From d83e31a29273b430aae758b337239cc481579860 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Sun, 28 Jun 2015 17:39:27 +0200 Subject: [PATCH 2/2] tests/ng_networking: update BOARD_INSUFFICIENT_RAM --- examples/ng_networking/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ng_networking/Makefile b/examples/ng_networking/Makefile index ee2df72ec8..bd1b6fc874 100644 --- a/examples/ng_networking/Makefile +++ b/examples/ng_networking/Makefile @@ -9,7 +9,7 @@ RIOTBASE ?= $(CURDIR)/../.. BOARD_INSUFFICIENT_RAM := airfy-beacon chronos msb-430 msb-430h nucleo-f334 \ pca10000 pca10005 redbee-econotag stm32f0discovery \ - yunjia-nrf51822 z1 + telosb wsn430-v1_3b wsn430-v1_4 yunjia-nrf51822 z1 BOARD_BLACKLIST := arduino-mega2560 # arduino-mega2560: unknown error types (e.g. -EBADMSG)