Skip to content

Commit bcffa5f

Browse files
author
Jarkko Paso
committed
FHSS: Fixed setting parent synch
1 parent e0276f6 commit bcffa5f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/Service_Libs/fhss/fhss_ws.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,9 @@ int fhss_ws_set_parent(fhss_structure_t *fhss_structure, const uint8_t eui64[8],
689689
fhss_stop_timer(fhss_structure, fhss_broadcast_handler);
690690
uint32_t time_from_reception_ms = divide_integer(fhss_structure->callbacks.read_timestamp(fhss_structure->fhss_api) - bc_timing_info->bt_rx_timestamp, 1000);
691691
uint32_t true_bc_interval_offset = (bc_timing_info->broadcast_interval_offset + time_from_reception_ms) % bc_timing_info->broadcast_interval;
692+
if (true_bc_interval_offset >= bc_timing_info->broadcast_dwell_interval) {
693+
fhss_structure->ws->is_on_bc_channel = false;
694+
}
692695
uint32_t timeout = ((bc_timing_info->broadcast_interval-true_bc_interval_offset)*1000);
693696

694697
if (fhss_structure->ws->is_on_bc_channel) {

0 commit comments

Comments
 (0)