diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-14 14:39:20 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-14 14:39:20 +0200 |
| commit | c576a4281ef8c87990ae6399393a827dfaccacd5 (patch) | |
| tree | 0f28b7d1fc2ba73ccea5d7513281b0f8cae76fb6 /WavDecodeTestController.cpp | |
| parent | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (diff) | |
New upstream version 3.3.0~beta2+dfsgupstream/3.3.0_beta2+dfsgupstream
Diffstat (limited to 'WavDecodeTestController.cpp')
| -rw-r--r-- | WavDecodeTestController.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/WavDecodeTestController.cpp b/WavDecodeTestController.cpp index 8e25787c..62d33da2 100644 --- a/WavDecodeTestController.cpp +++ b/WavDecodeTestController.cpp @@ -23,7 +23,8 @@ WavDecodeTestController::WavDecodeTestController ( , m_window {window} , m_mode {mode} , m_period {mode == Mode::Fst4 ? 15 : mode == Mode::Fst4w ? 120 : 60} - , m_modeName {mode == Mode::Jt9 ? QStringLiteral ("JT9") + , m_modeName {mode == Mode::Jt4 ? QStringLiteral ("JT4") + : mode == Mode::Jt9 ? QStringLiteral ("JT9") : mode == Mode::Jt65 ? QStringLiteral ("JT65") : mode == Mode::Q65 ? QStringLiteral ("Q65") : mode == Mode::Fst4 ? QStringLiteral ("FST4") : QStringLiteral ("FST4W")} @@ -35,6 +36,8 @@ WavDecodeTestController::WavDecodeTestController ( connect (&m_timeout, &QTimer::timeout, this, [this] { finish (tr ("Timed out waiting for %1 WAV decoding.").arg (m_modeName)); }); + // Windows dispatches coarse timers separately from the mode restore's precise timers. + m_prepareTimer.setTimerType (Qt::PreciseTimer); m_prepareTimer.setSingleShot (true); connect (&m_prepareTimer, &QTimer::timeout, this, &WavDecodeTestController::prepareWhenReady); @@ -72,9 +75,11 @@ WavDecodeTestController::WavDecodeTestController ( finish (tr ("A short silent %1 WAV displayed a stale decode: %2").arg (m_modeName, message)); return; } - if (m_activeGeneration && message.simplified () == m_expectedMessage) + auto const expectedDisplayedMessage = m_mode == Mode::Jt4 + ? m_expectedMessage + QStringLiteral (" f") : m_expectedMessage; + if (m_activeGeneration && message.simplified () == expectedDisplayedMessage) { - if (m_mode != Mode::Jt9 && m_mode != Mode::Jt65) + if (m_mode != Mode::Jt4 && m_mode != Mode::Jt9 && m_mode != Mode::Jt65) { auto * display = m_window->findChild<QTextEdit *> ("decodedTextBrowser"); bool found = false; @@ -125,6 +130,7 @@ void WavDecodeTestController::prepareWhenReady () auto * fast = m_window->findChild<QAbstractButton *> ("cbFast9"); auto * cqOnly = m_window->findChild<QAbstractButton *> ("cbCQonly"); auto * frequency = m_window->findChild<QSpinBox *> ("RxFreqSpinBox"); + auto const fixtureFrequency = m_mode == Mode::Jt4 ? 1000 : 1500; auto * decode = m_window->findChild<QAbstractButton *> ("DecodeButton"); auto * rigStatus = m_window->findChild<QAbstractButton *> ("readFreq"); auto * period = m_window->findChild<QSpinBox *> (m_mode == Mode::Fst4w ? "sbTR_FST4W" : "sbTR"); @@ -147,10 +153,9 @@ void WavDecodeTestController::prepareWhenReady () mode->trigger (); quick->trigger (); submode->setValue (0); - if (m_mode != Mode::Jt9 && m_mode != Mode::Jt65) period->setValue (m_period); + if (m_mode != Mode::Jt4 && m_mode != Mode::Jt9 && m_mode != Mode::Jt65) period->setValue (m_period); if (fast->isChecked ()) fast->click (); cqOnly->setChecked (false); - frequency->setValue (1500); if (m_mode == Mode::Fst4 || m_mode == Mode::Fst4w) { auto * blanker = m_window->findChild<QSpinBox *> ("sbNB"); @@ -169,7 +174,7 @@ void WavDecodeTestController::prepareWhenReady () { auto * receive = m_window->findChild<QSpinBox *> ("sbFST4W_RxFreq"); if (!receive) { finish (tr ("The FST4W frequency control was not found.")); return; } - receive->setValue (1500); + receive->setValue (fixtureFrequency); } m_configured = true; m_prepareTimer.start (100); @@ -177,12 +182,13 @@ void WavDecodeTestController::prepareWhenReady () } if (!mode->isChecked () || !quick->isChecked () || submode->value () != 0 || fast->isChecked () - || (m_mode != Mode::Jt9 && m_mode != Mode::Jt65 && period->value () != m_period) + || (m_mode != Mode::Jt4 && m_mode != Mode::Jt9 && m_mode != Mode::Jt65 && period->value () != m_period) || !m_window->configureLiveAudioTestDecodeRange ()) { finish (tr ("Unable to configure ordinary %1A decoding.").arg (m_modeName)); return; } + frequency->setValue (fixtureFrequency); m_started = true; loadShortWav (); } @@ -310,7 +316,7 @@ void WavDecodeTestController::completeCycle (quint64 generation) } if (m_stage == Stage::Repeat) { - m_stage = m_mode == Mode::Jt9 || m_mode == Mode::Jt65 + m_stage = m_mode == Mode::Jt4 || m_mode == Mode::Jt9 || m_mode == Mode::Jt65 ? Stage::ShortReplacement : Stage::ShortBeforeMonitoring; loadShortWav (); return; @@ -328,7 +334,7 @@ void WavDecodeTestController::completeCycle (quint64 generation) finish (); return; } - if (m_mode != Mode::Jt9 && m_mode != Mode::Jt65) + if (m_mode != Mode::Jt4 && m_mode != Mode::Jt9 && m_mode != Mode::Jt65) { auto * period = m_window->findChild<QSpinBox *> (m_mode == Mode::Fst4w ? "sbTR_FST4W" : "sbTR"); period->setValue (m_mode == Mode::Fst4w ? 300 : m_period == 15 ? 30 : 15); |
