RPL MRHOF with ETX: bypass weighted moving average when setting a parent's link metric for the first time

This commit is contained in:
Simon Duquennoy 2014-04-29 16:25:16 +02:00
parent b0f1199202
commit 33cfd92475
5 changed files with 20 additions and 9 deletions

View file

@ -1082,8 +1082,8 @@ rpl_recalculate_ranks(void)
*/
p = nbr_table_head(rpl_parents);
while(p != NULL) {
if(p->dag != NULL && p->dag->instance && p->updated) {
p->updated = 0;
if(p->dag != NULL && p->dag->instance && (p->flags & RPL_PARENT_FLAG_UPDATED)) {
p->flags &= ~RPL_PARENT_FLAG_UPDATED;
PRINTF("RPL: rpl_process_parent_event recalculate_ranks\n");
if(!rpl_process_parent_event(p->dag->instance, p)) {
PRINTF("RPL: A parent was dropped\n");