summaryrefslogtreecommitdiff
path: root/Ft8TxLoopbackTestController.hpp
diff options
context:
space:
mode:
authorhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
committerhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
commitc25cbdf6fb6d946175f4335fab77bfea601b56db (patch)
tree6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /Ft8TxLoopbackTestController.hpp
parent71f5689252c9f13e70e1c24856904475b2307809 (diff)
parent0685fcada9f95fe90f70b387cd7d757da8209624 (diff)
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to 'Ft8TxLoopbackTestController.hpp')
-rw-r--r--Ft8TxLoopbackTestController.hpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/Ft8TxLoopbackTestController.hpp b/Ft8TxLoopbackTestController.hpp
new file mode 100644
index 00000000..de80ac26
--- /dev/null
+++ b/Ft8TxLoopbackTestController.hpp
@@ -0,0 +1,60 @@
+// -*- Mode: C++ -*-
+#ifndef FT8_TX_LOOPBACK_TEST_CONTROLLER_HPP__
+#define FT8_TX_LOOPBACK_TEST_CONTROLLER_HPP__
+
+#include <QObject>
+#include <QString>
+#include <QTimer>
+
+class FixtureSoundOutput;
+class MainWindow;
+
+class Ft8TxLoopbackTestController final
+ : public QObject
+{
+ Q_OBJECT
+
+public:
+ Ft8TxLoopbackTestController (MainWindow * window,
+ FixtureSoundOutput * output,
+ QString capturePath,
+ QObject * parent = nullptr);
+
+ void begin ();
+ bool succeeded () const {return m_succeeded;}
+
+private:
+ void prepareWhenReady ();
+ void startWhenScheduled ();
+ void handleStartDecision (qint64 sessionId, qint64 generation,
+ qint64 targetPeriodStartMs, bool accepted,
+ qint64 actualStartMs);
+ void maybeFinish ();
+ bool validateCapture (QString * error) const;
+ void fail (QString const& reason);
+ void checkForUnexpectedModal ();
+
+ MainWindow * m_window;
+ FixtureSoundOutput * m_output;
+ QString m_capturePath;
+ QTimer m_timeout;
+ QTimer m_prepareTimer;
+ QTimer m_startTimer;
+ QTimer m_modalTimer;
+ qint64 m_targetPeriodStartMs {0};
+ qint64 m_startSessionId {-1};
+ qint64 m_startGeneration {-1};
+ qint64 m_startCallbackMs {-1};
+ qint64 m_startDecidedMs {-1};
+ qint64 m_firstNonSilentFrame {-1};
+ qint64 m_capturedFrames {0};
+ int m_captureStartCount {0};
+ int m_captureStopCount {0};
+ int m_startAttemptCount {0};
+ bool m_prepared {false};
+ bool m_autoDisabledDuringTransmit {false};
+ bool m_finished {false};
+ bool m_succeeded {false};
+};
+
+#endif