Skip to content

Commit 3ce95fa

Browse files
author
Jarkko Paso
committed
FHSS WS: Fixed drift compensation stats
1 parent b878bd9 commit 3ce95fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/Service_Libs/fhss/fhss_ws.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ int fhss_ws_set_parent(fhss_structure_t *fhss_structure, const uint8_t eui64[8],
861861
drift_per_ms_tmp = -MAX_DRIFT_COMPENSATION_STEP;
862862
}
863863
fhss_structure->ws->drift_per_millisecond_ns += drift_per_ms_tmp;
864-
fhss_stats_update(fhss_structure, STATS_FHSS_DRIFT_COMP, fhss_structure->ws->drift_per_millisecond_ns * bc_timing_info->broadcast_dwell_interval);
864+
fhss_stats_update(fhss_structure, STATS_FHSS_DRIFT_COMP, NS_TO_US(fhss_structure->ws->drift_per_millisecond_ns * bc_timing_info->broadcast_dwell_interval));
865865
}
866866
tr_debug("synch to parent: %s, drift: %"PRIi32"ms in %"PRIu32" seconds, compensation: %"PRIi32"ns per ms", trace_array(eui64, 8), 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_S(time_since_last_synch_us), fhss_structure->ws->drift_per_millisecond_ns);
867867
}

0 commit comments

Comments
 (0)