summaryrefslogtreecommitdiff
path: root/Configuration.cpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-06-22 12:03:44 +0200
committerChristoph Berg <myon@debian.org>2026-06-22 12:03:44 +0200
commitd83a420f0517d7fc47aeb288a6a0cf4891784fcc (patch)
tree6d9c83527c56458a8360ba080bf5f4ca73d526dc /Configuration.cpp
parent4b089ae3f7e9e2d5662f718f663b26a4e8ee63ca (diff)
New upstream version 3.0.2+dfsgupstream/3.0.2+dfsg
Diffstat (limited to 'Configuration.cpp')
-rw-r--r--Configuration.cpp19
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);