Skip to content

Commit

Permalink
FHSS: Fixed setting parent synch
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarkko Paso committed Oct 16, 2018
1 parent e0276f6 commit bcffa5f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/Service_Libs/fhss/fhss_ws.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,9 @@ int fhss_ws_set_parent(fhss_structure_t *fhss_structure, const uint8_t eui64[8],
fhss_stop_timer(fhss_structure, fhss_broadcast_handler);
uint32_t time_from_reception_ms = divide_integer(fhss_structure->callbacks.read_timestamp(fhss_structure->fhss_api) - bc_timing_info->bt_rx_timestamp, 1000);
uint32_t true_bc_interval_offset = (bc_timing_info->broadcast_interval_offset + time_from_reception_ms) % bc_timing_info->broadcast_interval;
if (true_bc_interval_offset >= bc_timing_info->broadcast_dwell_interval) {
fhss_structure->ws->is_on_bc_channel = false;
}
uint32_t timeout = ((bc_timing_info->broadcast_interval-true_bc_interval_offset)*1000);

if (fhss_structure->ws->is_on_bc_channel) {
Expand Down

0 comments on commit bcffa5f

Please sign in to comment.