From 84d6a667f1ff840781567bf5da7b1535e8448e41 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 20 Apr 2016 20:22:23 +0000 Subject: [PATCH] Ensure that WSPR band hopping is disabled when Rig is None Also added a new configuration query method to check if Rig is None i.e. a dummy rig. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6629 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- Configuration.cpp | 5 +++++ Configuration.hpp | 3 +++ mainwindow.cpp | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Configuration.cpp b/Configuration.cpp index adde84f7a..7dd86ed83 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -658,6 +658,11 @@ bool Configuration::is_transceiver_online () const return m_->rig_active_; } +bool Configuration::is_dummy_rig () const +{ + return m_->rig_is_dummy_; +} + bool Configuration::transceiver_online () { #if WSJT_TRACE_CAT diff --git a/Configuration.hpp b/Configuration.hpp index a8927a919..25efa8f29 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -157,6 +157,9 @@ public: // already open. bool transceiver_online (); + // check if a real rig is configured + bool is_dummy_rig () const; + // Frequency resolution of the rig // // 0 - 1Hz diff --git a/mainwindow.cpp b/mainwindow.cpp index 9c610b020..b60acdec7 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -5245,7 +5245,8 @@ void MainWindow::on_pbTxNext_clicked(bool b) void MainWindow::WSPR_scheduling () { m_WSPR_tx_next = false; - if (m_config.is_transceiver_online () // need rig control for hopping + if (m_config.is_transceiver_online () // need working rig control for hopping + && !m_config.is_dummy_rig () && ui->band_hopping_group_box->isChecked ()) { auto hop_data = m_WSPR_band_hopping.next_hop (m_auto); qDebug () << "hop data: period:" << hop_data.period_name_