From a1eb193278df3859a50509c70aaf4499ef03ad51 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Sun, 19 May 2019 10:13:46 -0400 Subject: [PATCH] Fixed #119: hold PTT open if more frames are available (experimental patch from Peter GM8JCF) --- mainwindow.cpp | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index e3c4608..50c4bb9 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -5302,10 +5302,28 @@ void MainWindow::stopTx() statusUpdate (); } -void MainWindow::stopTx2() -{ +/* Original stopTx2 +void MainWindow::stopTx2(){ + emitPTT(false); } +*/ + +/* GM8JCF + * StopTx2 is called to stop transmission, eg Open PTT +*/ +void MainWindow::stopTx2(){ + qDebug() << "**** GM8JCF **** MainWindow::stopTx2 m_txFrameCount : " << m_txFrameCount; + + // m_txFrameCount is set to the number of frames to be transmitted when the send button is pressed + // and remains at that count until the last frame is transmitted. + // So, we keep the PTT ON so long as m_txFrameCount is non-zero + + // If frames to be transmitted has hit zero then open PTT + if (m_txFrameCount == 0){ + emitPTT(false); + } +} void MainWindow::ba2msg(QByteArray ba, char message[]) //ba2msg() { @@ -8623,7 +8641,14 @@ void MainWindow::handle_transceiver_update (Transceiver::TransceiverState const& //qDebug () << "MainWindow::handle_transceiver_update:" << s; Transceiver::TransceiverState old_state {m_rigState}; //transmitDisplay (s.ptt ()); - if (s.ptt () && !m_rigState.ptt ()) // safe to start audio + + // GM8JCF + // in stopTx2 we maintain PTT if there are still untransmitted JS8 frames + // so we need to remove the check which prevents modulation generation when PTT is closed + // If the check is left inline, then PTT will stay closed, but no modulation will occur + // if PTT is closed. Hence we comment out the test below + + //if (s.ptt () && !m_rigState.ptt ()) // safe to start audio // (caveat - DX Lab Suite Commander) { if (m_tx_when_ready && g_iptt) // waiting to Tx and still needed