Skip to content

Commit f4e9a1b

Browse files
author
Juha Heiskanen
committed
Disable fhss compensation at parent selection if fixed channel mode is enabled for broadcast.
Change-Id: I33afd2ce069c932f5f477f11f8450cd6515e5a08
1 parent 2417093 commit f4e9a1b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/Service_Libs/fhss/fhss_ws.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,8 @@ int fhss_ws_set_parent(fhss_structure_t *fhss_structure, const uint8_t eui64[8],
807807
platform_exit_critical();
808808
//TODO: support multiple parents
809809
fhss_structure->ws->parent_bc_info = bc_timing_info;
810-
if (prev_synchronization_time) {
810+
if (prev_synchronization_time && fhss_structure->ws->fhss_configuration.ws_bc_channel_function != WS_FIXED_CHANNEL) {
811+
//TODO: Compensation for fixed channel configuration
811812
if (SYNCH_COMPENSATION_MIN_INTERVAL <= US_TO_S(time_since_last_synch_us)) {
812813
// Update clock drift
813814
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));

0 commit comments

Comments
 (0)