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;