Skip to content

Commit e3e5a00

Browse files
author
Juha Heiskanen
committed
Timed parent selection timer trigger update
Changed Trigged timed parent selection from delay multiple 0.9-1.1 --> 1.0-1.2. This will guarantee that we will allways wait iMin time to learn other candidate hear. Change-Id: I4c6c16ba5d3c1d9868f35d583c30bffaf6b7b775
1 parent 7144121 commit e3e5a00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/RPL/rpl_upward.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ void rpl_instance_force_leaf(rpl_instance_t *instance)
355355
void rpl_instance_trigger_parent_selection(rpl_instance_t *instance, uint16_t delay)
356356
{
357357
if (instance->parent_selection_timer == 0 || instance->parent_selection_timer > delay) {
358-
instance->parent_selection_timer = randLIB_randomise_base(delay, 0x7333, 0x8CCD) /* +/- 10% */;
358+
instance->parent_selection_timer = randLIB_randomise_base(delay, 0x8000, 0x999A) /* Random between delay * 1.0-1.2 */;
359359
tr_debug("Timed parent triggered %u", instance->parent_selection_timer);
360360
}
361361
}

0 commit comments

Comments
 (0)