From 74970acdb72e9151966e7c0ef546b2125e64fed1 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Thu, 16 Jul 2020 14:09:24 +0100 Subject: [PATCH] Align FST240W round-robin scheduling with hours --- widgets/mainwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index bd130db0b..3f08eefda 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3591,11 +3591,11 @@ void MainWindow::guiUpdate() if(m_mode=="WSPR" or m_mode=="FST240W") { if(m_nseq==0 and m_ntr==0) { //Decide whether to Tx or Rx m_tuneup=false; //This is not an ATU tuneup - if(m_pctx==0) m_WSPR_tx_next = false; //Don't transmit if m_pctx=0 + if(ui->sbTxPercent->isEnabled () && m_pctx==0) m_WSPR_tx_next = false; //Don't transmit if m_pctx=0 bool btx = m_auto && m_WSPR_tx_next; // To Tx, we need m_auto and // scheduled transmit if(m_auto and m_txNext) btx=true; //TxNext button overrides - if(m_auto and m_pctx==100) btx=true; //Always transmit + if(m_auto && ui->sbTxPercent->isEnabled () && m_pctx==100) btx=true; //Always transmit if(btx) { m_ntr=-1; //This says we will have transmitted @@ -7946,13 +7946,13 @@ void MainWindow::WSPR_scheduling () { QString t=ui->RoundRobin->currentText(); if(m_mode=="FST240W" and t!="Random") { - int i=t.left(1).toInt(); + int i=t.left (1).toInt () - 1; int n=t.right(1).toInt(); qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000; int nsec=ms/1000; int ntr=m_TRperiod; - int j=(nsec % (n*ntr))/ntr + 1; + int j=((nsec+ntr) % (n*ntr))/ntr; m_WSPR_tx_next=(i==j); return; }