Clean up the declaration and use of fTR.

This commit is contained in:
Joe Taylor 2021-06-10 19:12:49 -04:00
parent e3de62152d
commit 4b120abf93

View File

@ -3904,7 +3904,7 @@ void MainWindow::guiUpdate()
tx_watchdog (true); // disable transmit
}
float fTR=float((ms%int(1000.0*m_TRperiod)))/int(1000.0*m_TRperiod);
double fTR=float((ms%int(1000.0*m_TRperiod)))/int(1000.0*m_TRperiod);
QString txMsg;
if(m_ntx == 1) txMsg=ui->tx1->text();
@ -3916,7 +3916,7 @@ void MainWindow::guiUpdate()
int msgLength=txMsg.trimmed().length();
if(msgLength==0 and !m_tune) on_stopTxButton_clicked();
if(g_iptt==0 and ((m_bTxTime and fTR<0.75 and msgLength>0) or m_tune)) {
if(g_iptt==0 and ((m_bTxTime and (fTR < 0.75) and (msgLength>0)) or m_tune)) {
//### Allow late starts
icw[0]=m_ncw;
g_iptt = 1;
@ -4278,6 +4278,7 @@ void MainWindow::guiUpdate()
m_sentFirst73 = false;
}
}
if (g_iptt == 1 && m_iptt0 == 0) {
auto const& current_message = QString::fromLatin1 (msgsent);
if(m_config.watchdog () && m_mode!="WSPR" && m_mode!="FST4W"
@ -4310,11 +4311,10 @@ void MainWindow::guiUpdate()
transmitDisplay (true);
statusUpdate ();
}
if(!m_btxok && m_btxok0 && g_iptt==1)
{
if(!m_btxok && m_btxok0 && g_iptt==1) {
stopTx();
if ("1" == m_env.value ("WSJT_TX_BOTH", "0"))
{
if ("1" == m_env.value ("WSJT_TX_BOTH", "0")) {
m_txFirst = !m_txFirst;
ui->txFirstCheckBox->setChecked (m_txFirst);
}