From ba05cbf1f0403bf95deb2674b8524866cf9d1d9a Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Fri, 5 Jun 2015 00:41:12 +0000 Subject: [PATCH] Force tx schedule update when pctx changes git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5534 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- WsprTxScheduler.cpp | 3 ++- WsprTxScheduler.h | 2 +- mainwindow.cpp | 3 --- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/WsprTxScheduler.cpp b/WsprTxScheduler.cpp index 1fe326047..00c5fa58f 100644 --- a/WsprTxScheduler.cpp +++ b/WsprTxScheduler.cpp @@ -160,9 +160,10 @@ int next_tx_state(int pctx) int tx_20min_slot = (hour-tx_2hr_slot*2)*3 + minute/20; int tx_2min_slot = (minute%20)/2; - if( tx_2hr_slot != tx_table_2hr_slot ) { + if( (tx_2hr_slot != tx_table_2hr_slot) || (tx_table_pctx != pctx) ) { create_tx_schedule(pctx); tx_table_2hr_slot = tx_2hr_slot; + tx_table_pctx = pctx; } cout << "Hour " << hour << " Minute " << minute << endl; diff --git a/WsprTxScheduler.h b/WsprTxScheduler.h index f3c4a6121..e19f17456 100644 --- a/WsprTxScheduler.h +++ b/WsprTxScheduler.h @@ -7,7 +7,7 @@ using namespace std; char tx[6][10]; -int tx_table_2hr_slot=-1; +int tx_table_2hr_slot=-1, tx_table_pctx=0; int tx_band_sum(char bsum[10]); int tx_add_to_band(int band); diff --git a/mainwindow.cpp b/mainwindow.cpp index 925b5ee85..c34ba7c19 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -4290,9 +4290,6 @@ void MainWindow::bandHopping() << "tune:" << hop_data.tune_required_ << "tx:" << hop_data.tx_next_; - int blah = next_tx_state(m_pctx); - printf("next tx state %d\n",blah); - // if (m_auto &&hop_data.tx_next_) { if ( m_auto && next_tx_state(m_pctx) ) { m_nrx = 0;