Skip to content

Commit f836d1d

Browse files
author
Jarkko Paso
authored
FHSS WS: spread broadcast messages better on BC channel (#2449)
1 parent 5e40cb3 commit f836d1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/Service_Libs/fhss/fhss_ws.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,12 @@ static void fhss_broadcast_handler(const fhss_api_t *fhss_api, uint16_t delay)
305305

306306
/* Start timer with random timeout to trigger broadcast TX queue poll event.
307307
* Min random is 1/50 of the channel dwell interval.
308-
* Max random is 1/10 of the channel dwell interval.
308+
* Max random is 3/4 of the channel dwell interval.
309309
* Event timer resolution is 50us.
310310
*/
311311
uint32_t bc_dwell_us = MS_TO_US(fhss_structure->ws->fhss_configuration.fhss_bc_dwell_interval);
312312
uint16_t bc_min_random = (bc_dwell_us / 50) / 50;
313-
uint16_t bc_max_random = (bc_dwell_us / 10) / 50;
313+
uint16_t bc_max_random = (bc_dwell_us - (bc_dwell_us / 4)) / 50;
314314
eventOS_callback_timer_start(fhss_structure->fhss_event_timer, randLIB_get_random_in_range(bc_min_random, bc_max_random));
315315
} else {
316316
fhss_structure->ws->unicast_start_time_us = fhss_structure->callbacks.read_timestamp(fhss_structure->fhss_api);

0 commit comments

Comments
 (0)