From 236c459ecf181c11832c5e0eec08173620c49f2f Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Thu, 7 Apr 2011 09:26:12 +0200 Subject: [PATCH 1/2] Added missing include --- platform/esb/dev/irq.c | 1 + platform/esb/dev/radio-sensor.c | 1 + platform/esb/dev/sound-sensor.c | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/esb/dev/irq.c b/platform/esb/dev/irq.c index 4babd2edc..d9efdd084 100644 --- a/platform/esb/dev/irq.c +++ b/platform/esb/dev/irq.c @@ -33,6 +33,7 @@ #include "lib/sensors.h" #include "dev/irq.h" #include "dev/lpm.h" +#include #include #define ADC12MCTL_NO(adcno) ((unsigned char *) ADC12MCTL0_)[adcno] diff --git a/platform/esb/dev/radio-sensor.c b/platform/esb/dev/radio-sensor.c index 898a2ea30..b13c7b345 100644 --- a/platform/esb/dev/radio-sensor.c +++ b/platform/esb/dev/radio-sensor.c @@ -34,6 +34,7 @@ #include "dev/radio-sensor.h" #include "dev/irq.h" #include "dev/tr1001.h" +#include const struct sensors_sensor radio_sensor; diff --git a/platform/esb/dev/sound-sensor.c b/platform/esb/dev/sound-sensor.c index 593c838ce..309f2d9cb 100644 --- a/platform/esb/dev/sound-sensor.c +++ b/platform/esb/dev/sound-sensor.c @@ -30,9 +30,10 @@ * * @(#)$Id: sound-sensor.c,v 1.5 2010/02/08 00:00:45 nifi Exp $ */ -#include #include "dev/sound-sensor.h" #include "dev/irq.h" +#include +#include #define MIC_MIN_SENS 150 #define SAMPLE 1 From 5a4a39afb3b33f3664c27c806ba2e581a0e8516d Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Thu, 7 Apr 2011 09:46:37 +0200 Subject: [PATCH 2/2] changed etx to metric --- core/net/neighbor-info.h | 6 +++--- examples/ipv6/rpl-collect/udp-sender.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/net/neighbor-info.h b/core/net/neighbor-info.h index f292c2ef1..0332142f3 100644 --- a/core/net/neighbor-info.h +++ b/core/net/neighbor-info.h @@ -82,10 +82,10 @@ int neighbor_info_subscribe(neighbor_info_subscriber_t); /** - * Get link ETX value for a specific neighbor. + * Get link metric value for a specific neighbor. * - * \return Returns ETX if the neighbor exists, and 0 if not. + * \return Returns link metric if the neighbor exists, and 0 if not. */ -link_metric_t neighbor_info_get_etx(const rimeaddr_t *addr); +link_metric_t neighbor_info_get_metric(const rimeaddr_t *addr); #endif /* NEIGHBOR_INFO_H */ diff --git a/examples/ipv6/rpl-collect/udp-sender.c b/examples/ipv6/rpl-collect/udp-sender.c index 430e55e29..6652f5f0b 100644 --- a/examples/ipv6/rpl-collect/udp-sender.c +++ b/examples/ipv6/rpl-collect/udp-sender.c @@ -136,7 +136,7 @@ collect_common_send(void) nbr = uip_ds6_nbr_lookup(&preferred_parent->addr); if(nbr != NULL) { rimeaddr_copy(&parent, (rimeaddr_t *)&nbr->ipaddr.u8[8]); - parent_etx = neighbor_info_get_etx((rimeaddr_t *) &nbr->lladdr) / 2; + parent_etx = neighbor_info_get_metric((rimeaddr_t *) &nbr->lladdr) / 2; } } rtmetric = dag->rank;