1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 14:03:55 +01:00

gnrc/rpl: Move GNRC_RPL_DEFAULT_MAX_RANK_INCREASE to 'CONFIG_'

This commit is contained in:
Leandro Lanzieri 2020-04-24 11:20:12 +02:00
parent 1b6f915e0c
commit 5a28e7cad4
No known key found for this signature in database
GPG Key ID: 13559905E2EBEAA5
2 changed files with 4 additions and 4 deletions

View File

@ -188,8 +188,8 @@ extern "C" {
/**
* @brief Maximum rank increase
*/
#ifndef GNRC_RPL_DEFAULT_MAX_RANK_INCREASE
#define GNRC_RPL_DEFAULT_MAX_RANK_INCREASE (0)
#ifndef CONFIG_GNRC_RPL_DEFAULT_MAX_RANK_INCREASE
#define CONFIG_GNRC_RPL_DEFAULT_MAX_RANK_INCREASE (0)
#endif
/**

View File

@ -87,7 +87,7 @@ bool gnrc_rpl_instance_add(uint8_t instance_id, gnrc_rpl_instance_t **inst)
if (*inst != NULL) {
(*inst)->id = instance_id;
(*inst)->state = 1;
(*inst)->max_rank_inc = GNRC_RPL_DEFAULT_MAX_RANK_INCREASE;
(*inst)->max_rank_inc = CONFIG_GNRC_RPL_DEFAULT_MAX_RANK_INCREASE;
(*inst)->min_hop_rank_inc = CONFIG_GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE;
(*inst)->dodag.parents = NULL;
(*inst)->cleanup_event.msg.content.ptr = (*inst);
@ -389,7 +389,7 @@ gnrc_rpl_instance_t *gnrc_rpl_root_instance_init(uint8_t instance_id, ipv6_addr_
inst->of = (gnrc_rpl_of_t *) gnrc_rpl_get_of_for_ocp(GNRC_RPL_DEFAULT_OCP);
inst->mop = mop;
inst->min_hop_rank_inc = CONFIG_GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE;
inst->max_rank_inc = GNRC_RPL_DEFAULT_MAX_RANK_INCREASE;
inst->max_rank_inc = CONFIG_GNRC_RPL_DEFAULT_MAX_RANK_INCREASE;
}
else if (inst == NULL) {
DEBUG("RPL: could not allocate memory for a new instance with id %d\n", instance_id);