From 432928d00031069239b88e82f168d20638f1a260 Mon Sep 17 00:00:00 2001 From: Adam Dunkels Date: Sun, 13 Feb 2011 21:29:59 +0100 Subject: [PATCH] Changed the name of macros defined in neighbor-info.h to have the NEIGHBOR_INFO prefix. --- core/net/rpl/rpl-of0.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/net/rpl/rpl-of0.c b/core/net/rpl/rpl-of0.c index 5512228e5..cc473faa6 100644 --- a/core/net/rpl/rpl-of0.c +++ b/core/net/rpl/rpl-of0.c @@ -60,7 +60,7 @@ rpl_of_t rpl_of0 = { #define DEFAULT_RANK_INCREMENT DEFAULT_MIN_HOPRANKINC -#define MIN_DIFFERENCE (ETX_DIVISOR + ETX_DIVISOR / 2) +#define MIN_DIFFERENCE (NEIGHBOR_INFO_ETX_DIVISOR + NEIGHBOR_INFO_ETX_DIVISOR / 2) static void reset(rpl_dag_t *dag) @@ -105,8 +105,10 @@ best_parent(rpl_parent_t *p1, rpl_parent_t *p2) p2->etx, p2->rank); - r1 = DAG_RANK(p1->rank, (rpl_dag_t *)p1->dag) * ETX_DIVISOR + p1->etx; - r2 = DAG_RANK(p2->rank, (rpl_dag_t *)p1->dag) * ETX_DIVISOR + p2->etx; + r1 = DAG_RANK(p1->rank, (rpl_dag_t *)p1->dag) * NEIGHBOR_INFO_ETX_DIVISOR + + p1->etx; + r2 = DAG_RANK(p2->rank, (rpl_dag_t *)p1->dag) * NEIGHBOR_INFO_ETX_DIVISOR + + p2->etx; /* Compare two parents by looking both and their rank and at the ETX for that parent. We choose the parent that has the most favourable combination. */