MainCode/adalm1000_logger.py aktualisiert

Neue datei pro cyclus
(C)
This commit is contained in:
Jan 2025-07-10 19:31:16 +02:00
parent f4dc4506b3
commit 803c7086d4

View File

@ -266,6 +266,8 @@ class BatteryTester(QMainWindow):
self.plot_mutex = threading.Lock()
super().__init__()
self.last_logged_phase = None
# Color scheme
self.bg_color = "#2E3440"
self.fg_color = "#D8DEE9"
@ -708,6 +710,13 @@ class BatteryTester(QMainWindow):
])
self.current_cycle_file.flush()
self._last_log_time = now
# Zyklusbeginn erkennen: Wechsel von Resting → Charge
if self.test_running:
phase = self.test_phase
if (phase == "Charge" and self.last_logged_phase != "Charge"):
self.create_cycle_log_file() # Neue Datei für neuen Zyklus
self.last_logged_phase = phase
def start_test(self):
"""Start the full battery test cycle"""