diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-01-18 09:37:41 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-01-18 09:37:41 +0100 |
commit | d78b72e0c132cb0bb88fa9a7bd01c4f68b36ffb9 (patch) | |
tree | bf17edf3a9b6f7b120f31dc914939a29ef80a5b6 /lib/lennart | |
parent | ac22b1deb81c5e314477f19238e39b518dfccbe0 (diff) |
drift_compensation_grpah: handle node skips at the tail
Diffstat (limited to 'lib/lennart')
-rw-r--r-- | lib/lennart/DataProcessor.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/lennart/DataProcessor.py b/lib/lennart/DataProcessor.py index 265ebce..e6bcac6 100644 --- a/lib/lennart/DataProcessor.py +++ b/lib/lennart/DataProcessor.py @@ -404,6 +404,15 @@ class DataProcessor: compensated_timestamps.append(expected_end_ts) prev_transition = transition + transition = len(transition_start_candidate_weights) - 1 + while transition - prev_transition > 0: + prev_drift = node_drifts[nodes[-1]] + prev_transition += 1 + expected_start_ts = sync_timestamps[prev_transition * 2] + prev_drift + expected_end_ts = sync_timestamps[prev_transition * 2 + 1] + prev_drift + compensated_timestamps.append(expected_start_ts) + compensated_timestamps.append(expected_end_ts) + if os.getenv("DFATOOL_EXPORT_DRIFT_COMPENSATION"): import json from dfatool.utils import NpEncoder |