diff --git a/MainCode/adalm1000_logger.py b/MainCode/adalm1000_logger.py index 7438dd2..64d45db 100644 --- a/MainCode/adalm1000_logger.py +++ b/MainCode/adalm1000_logger.py @@ -836,7 +836,8 @@ class BatteryTester(QMainWindow): self.dev.channels['A'].constant(0) except Exception as e: print(f"Error resetting device: {e}") - + test_current = self.c_rate * self.capacity + # Only try to close if file exists and is open if hasattr(self, 'current_cycle_file') and self.current_cycle_file is not None: try: