29 Commits

Author SHA1 Message Date
Jan
adc7edd501 MainCode/adalm1000_logger.py aktualisiert
.empty() replaced with not deque
(C)
2025-06-30 01:54:21 +02:00
Jan
06546bca76 MainCode/adalm1000_logger.py aktualisiert
QQueue is fully replaced with collections.deque

print(f"Devices found: {self.session.devices}") for debugging

A 1.5-second delay before initializing the session

Proper cleanup of session and threads

A fallback check and exception if no ADALM1000 is detected
2025-06-30 01:49:37 +02:00
Jan
0b7ea8c3c8 MainCode/adalm1000_logger.py aktualisiert
Remove QQueue from the import line.

Use collections.deque or queue.Queue instead.
(C)
2025-06-30 01:02:29 +02:00
Jan
c2780a0fc5 MainCode/adalm1000_logger.py aktualisiert
Thread Safety:

        Replaced threading.Lock with QMutex and QMutexLocker

        Created dedicated TestSequenceThread class using QThread

    Data Handling:

        Replaced deque with QQueue for better Qt integration

        Added data point limiting (10,000 points) to prevent memory issues

    Plot Improvements:

        Smoother auto-scaling with gradual transitions

        Better axis management with hysteresis

    Code Quality:

        PEP 8 compliance (consistent naming, docstrings)

        Type hints for better code clarity

        Google-style docstrings for all public methods

    New Features:

        Progress bar for test phases

        Better tooltips for UI elements

        Enhanced error handling and recovery

    Performance:

        More efficient data buffering

        Optimized plot updates
(D)
2025-06-30 00:48:02 +02:00
Jan
bc77ae2f6b MainCode/adalm1000_logger.py aktualisiert
Entladephase analog zur Ladephase verstärken

    Doppelten msg_box Aufruf entfernen

   (D)
2025-06-28 01:34:27 +02:00
Jan
f779d97397 MainCode/adalm1000_logger.py aktualisiert
(D)
2025-06-28 01:19:18 +02:00
Jan
a5ad053a0c MainCode/adalm1000_logger.py aktualisiert
Zeit bei messbeginn zurücksetzen
(D)
2025-06-28 01:03:50 +02:00
Jan
35bea6bdd1 MainCode/adalm1000_logger.py aktualisiert
Graceful Shutdown Sequence:

        Stop all measurement threads first

        Wait for them to complete

        Then cleanup the USB session

    Error Handling:

        Add more specific exception handling for USB operations

        Consider adding retries for non-critical operations

    Logging:

        Replace print statements with proper logging

        Consider logging to a file for debugging purposes
2025-06-28 00:59:54 +02:00
Jan
1f4b742604 MainCode/adalm1000_logger.py aktualisiert
(D)
2025-06-28 00:50:43 +02:00
Jan
0305463857 MainCode/adalm1000_logger.py aktualisiert
1. Verbesserte auto_scale_axes() Methode:
(D)
2025-06-13 18:21:17 +02:00
Jan
12fb82ce80 MainCode/adalm1000_logger.py aktualisiert
Got it working, from the push before.
(Deepseek)
2025-06-13 18:16:00 +02:00
Jan
81ccc8ccd7 MainCode/adalm1000_logger.py aktualisiert
Test phase display issue: When continuous mode is disabled and the discharge voltage is already below cutoff, the phase still shows "Discharge" instead of switching to "Idle".

    Graph update issue: The plot sometimes fails to update when starting a new test series.
(Deepseek)
2025-06-13 18:04:59 +02:00
Jan
1a6ebb2fab MainCode/adalm1000_logger.py aktualisiert
Clear log_buffer after every cycle, because logs are getting smaler the more cycles.
(D)
2025-05-28 17:06:24 +02:00
Jan
c697388157 MainCode/adalm1000_logger.py aktualisiert
 User unchecks Continuous Mode during discharge:

    Status updates immediately: "Continuous Mode disabled..."

    Discharge continues until cutoff voltage.

    Test stops after discharge (no rest phase or new cycle).

 User leaves Continuous Mode enabled:

    Test continues looping indefinitely (original behavior).
(D)
2025-05-27 22:09:52 +02:00
Jan
34be33434f MainCode/adalm1000_logger.py aktualisiert
This makes the stop operation more thorough and provides better visual feedback to the user. The plot will now clearly show that the test has been stopped and reset.
(D)
2025-05-26 13:38:12 +02:00
Jan
876fecb466 MainCode/adalm1000_logger.py aktualisiert
This change ensures that:

    The plot data buffers are cleared

    The plot lines are reset to empty data

    The axes are reset to default ranges (0-1)

    The canvas is redrawn to show the cleared plot
(Deepseek)
2025-05-26 13:35:44 +02:00
Jan
25322bc59d MainCode/adalm1000_logger.py aktualisiert
Safer:

    Application shutdown

    Thread cleanup

    Error recovery

    Reconnection scenarios
(Deepseek)
2025-05-25 17:08:26 +02:00
Jan
24cc224138 MainCode/adalm1000_logger.py aktualisiert
Separate Log Files: You've successfully implemented separate log files for each cycle without cycle numbers in filenames.

    1Hz UI Updates: The measurement display updates at 1Hz as requested.

    Throttled Plot Updates: Plot updates are properly throttled to prevent lag.

    Error Handling: Good error handling throughout the code.

    Thread Safety: Proper use of threading for measurements and test sequences.
(Deepseek)
2025-05-24 13:23:14 +02:00
Jan
1c928e22fc MainCode/adalm1000_logger.py aktualisiert
Show an error message when disconnected

    Automatically attempt to reconnect

    Keep retrying until successful

    Provide clear status updates throughout the process
2025-05-24 01:36:51 +02:00
Jan
6db656c71b MainCode/adalm1000_logger.py aktualisiert
change cyclecount to beginning

This will ensure your plot:

    Starts with a reasonable view of your expected voltage range

    Maintains good visibility of the key areas (charge/discharge cutoffs)

    Doesn't zoom out too far when there are measurement spikes

    Has better overall framing of the data
2025-05-24 01:33:36 +02:00
Jan
f50a641211 MainCode/adalm1000_logger.py aktualisiert
Make all measurements update live in the GUI

    Allow the stop button to immediately halt the test at any point in the cycle

    Still maintain proper cleanup and data saving when stopped
(Deepseek)
2025-05-24 01:20:08 +02:00
Jan
13148a64de MainCode/adalm1000_logger.py aktualisiert
Reducing unnecessary GUI updates

    Implementing buffered file I/O

    Throttling plot updates

    Only updating display elements when values change

    Using more efficient drawing methods for the plot
(Deepseek)
2025-05-23 23:41:21 +02:00
Jan
06c99bae38 MainCode/adalm1000_logger.py aktualisiert
Der Stop-Button setzt nur ein Flag (request_stop) statt sofort zu stoppen

    Die Entladephase überprüft dieses Flag und bricht ab, wenn es gesetzt ist

    Nach der Entladephase wird der Test nur beendet, wenn request_stop True ist

    Neue finalize_test Methode für konsistente Aufräumarbeiten

    Klare Statusmeldungen, die den Stop-Request anzeigen
(Deepseek)
2025-05-23 23:34:30 +02:00
Jan
a82cc2c981 MainCode/adalm1000_logger.py aktualisiert
Die Statusmeldung zeigt jetzt klar an, ob:
        Der Test normal weiterläuft ("Next: Charge to X.XV")
        Auf einen Interrupt gewartet wird ("Waiting for interrupt"
    Der Code prüft häufiger auf Interrupts, besonders zwischen den einzelnen Phasen
    Bei einem Interrupt wird der aktuelle Zyklus noch sauber zu Ende geführt, aber kein neuer gestartet
    Die Abschlussmeldung zeigt jetzt an, nach welchem Zyklus der Test unterbrochen wurde
(Deepseek)
2025-05-23 20:55:06 +02:00
Jan
07b86664c0 MainCode/adalm1000_logger.py aktualisiert
Cycling added
    Ich werde eine neue Variable continuous_mode hinzufügen, um den kontinuierlichen Betrieb zu steuern
    Die run_test_sequence() Methode wird modifiziert, um in einer Schleife zu laufen
    Die stop_test() Methode wird erweitert, um den kontinuierlichen Modus zu beenden
(Deepseek)
2025-05-23 20:38:50 +02:00
Jan
516e2a44b2 MainCode/adalm1000_logger.py aktualisiert
Timing angepasst (ChatGPT)
2025-05-23 20:27:54 +02:00
Jan
a9a871bff5 revert 165e27204b80d6368b69532100a7487eb48c853c
revert MainCode/adalm1000_logger.py aktualisiert

Charge Time handeling geändert (ChatGPT)
2025-05-23 20:26:55 +02:00
Jan
165e27204b MainCode/adalm1000_logger.py aktualisiert
Charge Time handeling geändert (ChatGPT)
2025-05-23 20:22:44 +02:00
Jan
1d58aba999 Dateien nach "MainCode" hochladen 2025-05-23 18:58:36 +02:00