From e6c20eeb87183199c0de74fa9e5a622d324e6864 Mon Sep 17 00:00:00 2001
From: Tammo Jan Dijkema <T.J.Dijkema@gmail.com>
Date: Sat, 8 Jun 2024 09:17:34 +0200
Subject: [PATCH] Skip old data

---
 power_plot.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/power_plot.py b/power_plot.py
index 668f8c4..0675175 100755
--- a/power_plot.py
+++ b/power_plot.py
@@ -132,6 +132,12 @@ class PowerPlotMainWindow(QMainWindow):
 
         if first_time is None:
             first_time = datetime.utcfromtimestamp(float(values[0]))
+        else:
+            while datetime.utcfromtimestamp(float(values[0])) < first_time:
+                while not values[0][0].isnumeric():
+                    line = sys.stdin.readline()
+                    values = line.split(",")
+
         self.time_dt = np.array(date2num(first_time))
 
         self.data = np.array([float(values[self.col_num])])
-- 
GitLab