Skip to content

Commit f7133f8

Browse files
author
Jarkko Paso
authored
Merge pull request ARMmbed#2158 from ARMmbed/remove_temp_debug_traces
fhss_ws: removed temporary debug traces
2 parents 96f962a + 2dc1a8e commit f7133f8

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

source/Service_Libs/fhss/fhss_ws.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -811,22 +811,16 @@ int fhss_ws_set_parent(fhss_structure_t *fhss_structure, const uint8_t eui64[8],
811811
return -1;
812812
}
813813
if (!bc_timing_info->broadcast_interval || !bc_timing_info->broadcast_dwell_interval) {
814-
//IOTTHD-3571 temporary debug traces
815-
tr_debug("No bc info to synch");
816814
return -1;
817815
}
818816
if (((uint32_t)S_TO_US(fhss_structure->ws->min_synch_interval) > (fhss_structure->callbacks.read_timestamp(fhss_structure->fhss_api) - fhss_structure->ws->synchronization_time)) && !force_synch) {
819-
//IOTTHD-3571 temporary debug traces
820-
tr_debug("Do not synch, min_synch_interval: %u, timestamp: %"PRIu32", synchronization_time: %"PRIu32"", fhss_structure->ws->min_synch_interval, fhss_structure->callbacks.read_timestamp(fhss_structure->fhss_api), fhss_structure->ws->synchronization_time);
821817
return 0;
822818
}
823819
platform_enter_critical();
824820
uint16_t own_bc_slot = fhss_structure->ws->bc_slot;
825821
uint32_t prev_synchronization_time = fhss_structure->ws->synchronization_time;
826822
fhss_structure->ws->synchronization_time = fhss_structure->callbacks.read_timestamp(fhss_structure->fhss_api);
827823
uint32_t time_since_last_synch_us = fhss_structure->ws->synchronization_time - prev_synchronization_time;
828-
//IOTTHD-3571 temporary debug traces
829-
tr_debug("time_since_last_synch_us: %"PRIu32", synchronization_time: %"PRIu32", prev_synchronization_time: %"PRIu32"", time_since_last_synch_us, fhss_structure->ws->synchronization_time, prev_synchronization_time);
830824
uint32_t own_bc_interval_offset = fhss_ws_calculate_broadcast_interval_offset(fhss_structure, fhss_structure->ws->synchronization_time);
831825
fhss_stop_timer(fhss_structure, fhss_broadcast_handler);
832826
uint32_t time_from_reception_ms = US_TO_MS(fhss_structure->callbacks.read_timestamp(fhss_structure->fhss_api) - bc_timing_info->bt_rx_timestamp);
@@ -870,9 +864,6 @@ int fhss_ws_set_parent(fhss_structure_t *fhss_structure, const uint8_t eui64[8],
870864
fhss_stats_update(fhss_structure, STATS_FHSS_DRIFT_COMP, NS_TO_US((int64_t)(fhss_structure->ws->drift_per_millisecond_ns * bc_timing_info->broadcast_dwell_interval)));
871865
}
872866
tr_debug("synch to parent: %s, drift: %"PRIi32"ms in %"PRIu64" 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);
873-
} else {
874-
//IOTTHD-3571 temporary debug traces
875-
tr_debug("Do not compensate");
876867
}
877868
fhss_stats_update(fhss_structure, STATS_FHSS_SYNCH_INTERVAL, US_TO_S(time_since_last_synch_us));
878869
return 0;

0 commit comments

Comments
 (0)