From f4e9a1ba3210b95c0239753a55f716d0dbe58cba Mon Sep 17 00:00:00 2001 From: Juha Heiskanen Date: Mon, 25 Mar 2019 09:24:13 +0200 Subject: [PATCH] Disable fhss compensation at parent selection if fixed channel mode is enabled for broadcast. Change-Id: I33afd2ce069c932f5f477f11f8450cd6515e5a08 --- source/Service_Libs/fhss/fhss_ws.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Service_Libs/fhss/fhss_ws.c b/source/Service_Libs/fhss/fhss_ws.c index 3c350270553..a159bbf095f 100644 --- a/source/Service_Libs/fhss/fhss_ws.c +++ b/source/Service_Libs/fhss/fhss_ws.c @@ -807,7 +807,8 @@ int fhss_ws_set_parent(fhss_structure_t *fhss_structure, const uint8_t eui64[8], platform_exit_critical(); //TODO: support multiple parents fhss_structure->ws->parent_bc_info = bc_timing_info; - if (prev_synchronization_time) { + if (prev_synchronization_time && fhss_structure->ws->fhss_configuration.ws_bc_channel_function != WS_FIXED_CHANNEL) { + //TODO: Compensation for fixed channel configuration if (SYNCH_COMPENSATION_MIN_INTERVAL <= US_TO_S(time_since_last_synch_us)) { // Update clock drift fhss_structure->ws->drift_per_millisecond_ns += divide_integer(MS_TO_NS((true_bc_interval_offset - own_bc_interval_offset) + ((int32_t)(fhss_structure->ws->bc_slot - own_bc_slot) * bc_timing_info->broadcast_interval)), US_TO_MS(time_since_last_synch_us));