diff options
| author | Christoph Berg <myon@debian.org> | 2026-06-22 12:03:55 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-06-22 12:03:55 +0200 |
| commit | de18fc13175a5bf0e2b48a042d2fc06e87c88d24 (patch) | |
| tree | f517074cd603d30eb7ba7e2122d38051e4c1439c /Configuration.cpp | |
| parent | b76e8361909e47f0937d4a64a5a4cb5939f51eb7 (diff) | |
| parent | d83a420f0517d7fc47aeb288a6a0cf4891784fcc (diff) | |
Update upstream source from tag 'upstream/3.0.2+dfsg'
Update to upstream version '3.0.2+dfsg'
with Debian dir 90381fe7be9f5ea84d9b16c9cccf200a3fbe138b
Diffstat (limited to 'Configuration.cpp')
| -rw-r--r-- | Configuration.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Configuration.cpp b/Configuration.cpp index 185b3e4b..bf598688 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -500,7 +500,7 @@ public: void transceiver_ptt (bool); void transceiver_audio (bool); void transceiver_tune (bool); - void transceiver_period (double); + void transceiver_period (double, bool = false); void transceiver_blocksize (qint32); void transceiver_modulator_start (QString, unsigned, double, double, double, bool, bool, double, double); void transceiver_modulator_stop (bool); @@ -1262,13 +1262,13 @@ void Configuration::transceiver_tune (bool on) m_->transceiver_tune (on); } -void Configuration::transceiver_period (double period) +void Configuration::transceiver_period (double period, bool force) { #if WSJT_TRACE_CAT qDebug () << "Configuration::transceiver_period:" << period << m_->cached_rig_state_; #endif - m_->transceiver_period (period); + m_->transceiver_period (period, force); } void Configuration::transceiver_blocksize (qint32 blocksize) @@ -4979,7 +4979,7 @@ void Configuration::impl::on_voices_combo_box_currentIndexChanged (int /* index void Configuration::impl::read_voices () { - QString audioPath = QCoreApplication::applicationDirPath() + "/sounds/"; + QString audioPath = app_sounds_directory (); QString voiceList = audioPath + "voices.dat"; // load the content of voices.dat file to the voices combo box QFile file2 {voiceList}; QStringList wordList; @@ -5009,7 +5009,7 @@ void Configuration::impl::on_pb_test_alerts_clicked (bool) read_voicesPath(); #ifdef WIN32 QAudioOutput info(QAudioDeviceInfo::defaultOutputDevice()); - QString audioPath = QCoreApplication::applicationDirPath() + "/sounds" + voicesPath_ + "/"; + QString audioPath = app_sounds_directory (voicesPath_); QAudioFormat format; format.setCodec("audio/pcm"); format.setSampleRate (48000); @@ -5023,7 +5023,7 @@ void Configuration::impl::on_pb_test_alerts_clicked (bool) effect->open(QIODevice::ReadOnly); audio->start(effect); #else - QString audioPath = QCoreApplication::applicationDirPath() + "/sounds" + voicesPath_ + "/"; + QString audioPath = app_sounds_directory (voicesPath_); QSound::play(audioPath + "Testing123.wav"); // for Linux and macOS #endif } @@ -5217,11 +5217,14 @@ void Configuration::impl::transceiver_tune (bool on) } -void Configuration::impl::transceiver_period (double period) +void Configuration::impl::transceiver_period (double period, bool force) { cached_rig_state_.online (true); // we want the rig online set_cached_mode (); - if (cached_rig_state_.period() != period) + // force bypasses the de-dup so a caller can re-assert the period even when + // the cache already holds it but the rig never actually applied it (e.g. a + // period set that was emitted while the TCI rig was still offline). + if (force || cached_rig_state_.period() != period) { // printf("%s(%0.1f) Configuration #:%d period: %0.1f cached: %0.1f\n",QDateTime::currentDateTimeUtc().toString("hh:mm:ss.zzz").toStdString().c_str(),transceiver_command_number_+1,period,cached_rig_state_.period()); cached_rig_state_.period (period); |
