mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
gnrc/gomach : Move GNRC_GOMACH_CP_RANDOM_END_US to 'CONIFG_'
This commit is contained in:
parent
e6da0bab49
commit
1505ea8e11
@ -111,12 +111,12 @@ extern "C" {
|
||||
*
|
||||
* Currently, GoMacH's WP is actually composed of
|
||||
* @ref CONFIG_GNRC_GOMACH_CP_DURATION_US and (+)
|
||||
* @ref GNRC_GOMACH_CP_RANDOM_END_US. We currently introduced this random
|
||||
* period to avoid beacon collision amongneighbor nodes. This macro may be
|
||||
* @ref CONFIG_GNRC_GOMACH_CP_RANDOM_END_US. We currently introduced this random
|
||||
* period to avoid beacon collision among neighbor nodes. This macro may be
|
||||
* removed in the future.
|
||||
*/
|
||||
#ifndef GNRC_GOMACH_CP_RANDOM_END_US
|
||||
#define GNRC_GOMACH_CP_RANDOM_END_US (1U * US_PER_MS)
|
||||
#ifndef CONFIG_GNRC_GOMACH_CP_RANDOM_END_US
|
||||
#define CONFIG_GNRC_GOMACH_CP_RANDOM_END_US (1U * US_PER_MS)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -1482,7 +1482,7 @@ static void gomach_listen_init(gnrc_netif_t *netif)
|
||||
gnrc_gomach_set_enter_new_cycle(netif, false);
|
||||
|
||||
/* Set listen period timeout. */
|
||||
uint32_t listen_period = random_uint32_range(0, GNRC_GOMACH_CP_RANDOM_END_US) +
|
||||
uint32_t listen_period = random_uint32_range(0, CONFIG_GNRC_GOMACH_CP_RANDOM_END_US) +
|
||||
CONFIG_GNRC_GOMACH_CP_DURATION_US;
|
||||
gnrc_gomach_set_timeout(netif, GNRC_GOMACH_TIMEOUT_CP_END, listen_period);
|
||||
gnrc_gomach_set_timeout(netif, GNRC_GOMACH_TIMEOUT_CP_MAX, GNRC_GOMACH_CP_DURATION_MAX_US);
|
||||
|
Loading…
Reference in New Issue
Block a user