From df04f15d9132ec6b2781edfccc5ad8d33dd3cdd9 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 30 Oct 2020 11:15:45 +0100 Subject: Add DFATOOL_EXPORT_LASYNC variable for ET+LA / ET+Timer sync eval --- lib/lennart/DataProcessor.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/lennart') diff --git a/lib/lennart/DataProcessor.py b/lib/lennart/DataProcessor.py index 07d2a2b..b46315a 100644 --- a/lib/lennart/DataProcessor.py +++ b/lib/lennart/DataProcessor.py @@ -171,6 +171,23 @@ class DataProcessor: ) * endFactor + start_timestamp return modified_timestamps_with_drift + def export_sync(self): + # [1st trans start, 1st trans stop, 2nd trans start, 2nd trans stop, ...] + sync_timestamps = list() + + for i in range(4, len(self.modified_timestamps) - 8, 2): + sync_timestamps.append( + (self.modified_timestamps[i], self.modified_timestamps[i + 1]) + ) + + # EnergyTrace timestamps + timestamps = self.plot_data_x + + # EnergyTrace power values + power = self.plot_data_y + + return {"sync": sync_timestamps, "timestamps": timestamps, "power": power} + def plot(self, annotateData=None): """ Plots the power usage and the timestamps by logic analyzer -- cgit v1.2.3