Cleaned up various fragments and fixed a compilation error that occured when switching metric container.
Fixed a wrapping problem in the ETX EWMA calculation. Corrected the multiplier of the link metric, and simplified the configuration so that the user does not need to specify the multiplier.
This commit is contained in:
parent
50395666fc
commit
43b5425493
3 changed files with 37 additions and 45 deletions
|
@ -548,7 +548,7 @@ rpl_add_parent(rpl_dag_t *dag, rpl_dio_t *dio, uip_ipaddr_t *addr)
|
|||
p->dag = dag;
|
||||
p->rank = dio->rank;
|
||||
p->dtsn = dio->dtsn;
|
||||
p->link_metric = RPL_INIT_LINK_METRIC;
|
||||
p->link_metric = RPL_INIT_LINK_METRIC * RPL_DAG_MC_ETX_DIVISOR;
|
||||
#if RPL_DAG_MC != RPL_DAG_MC_NONE
|
||||
memcpy(&p->mc, &dio->mc, sizeof(p->mc));
|
||||
#endif /* RPL_DAG_MC != RPL_DAG_MC_NONE */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue