From 0d7612218ff500247f29edde0eb216589f51f887 Mon Sep 17 00:00:00 2001 From: Brian Moran Date: Mon, 12 Aug 2024 17:04:32 -0700 Subject: [PATCH] show SFox tx messages in ALL.TXT --- widgets/mainwindow.cpp | 29 ++++++++++++++++++++++++++--- widgets/mainwindow.h | 1 + 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 5aafc1f70..376beb401 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -4961,7 +4961,10 @@ void MainWindow::guiUpdate() foxcom_.bSendMsg=ui->cbSendMsg->isChecked(); memcpy(foxcom_.textMsg, m_freeTextMsg.leftJustified(26,' ').toLatin1(),26); foxgen_(&bSuperFox, fname.constData(), (FCL)fname.size()); - if(bSuperFox) sfox_tx(); + if(bSuperFox) { + writeFoxTxMsgs(); + sfox_tx(); + } } } } @@ -10578,7 +10581,10 @@ Transmit: ::memcpy(foxcom_.textMsg, m_freeTextMsg0.leftJustified(26,' ').toLatin1(),26); auto fname {QDir::toNativeSeparators(m_config.writeable_data_dir().absoluteFilePath("sfox_1.dat")).toLocal8Bit()}; foxgen_(&bSuperFox, fname.constData(), (FCL)fname.size()); - if(bSuperFox) sfox_tx(); + if(bSuperFox) { + writeFoxTxMsgs(); + sfox_tx(); + } m_tFoxTxSinceCQ++; for(QString hc: m_foxQSO.keys()) { //Check for strikeout or timeout @@ -10711,7 +10717,24 @@ void MainWindow::foxGenWaveform(int i,QString fm) writeFoxQSO(t + fm.trimmed()); } -void MainWindow::writeFoxQSO(QString const& msg) +void MainWindow::writeFoxTxMsgs() { + // references extern struct foxcom_ + QString t; + for (int i = 0; i < 5; i++) { + t = QString::fromLatin1(foxcom_.cmsg[i]).left(40); + if (t.length() > 0) { + write_all("Tx", t); + } + } + t = QString::fromLatin1(foxcom_.textMsg).left(38); + if (foxcom_.bSendMsg) { + write_all("Tx", "-Free Text- "+t); + } + if (foxcom_.bMoreCQs) { + write_all("Tx", "-MoreCQs- "); + } +} + void MainWindow::writeFoxQSO(QString const& msg) { QString t; t = t.asprintf("%3d%3d%3d",m_houndQueue.count(),m_foxQSOinProgress.count(),m_foxQSO.count()); diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index adcb359f8..22e99c5f6 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -889,6 +889,7 @@ private: void activeWorked(QString call, QString band); void read_log(); void refreshPileupList(); + void writeFoxTxMsgs(); }; extern int killbyname(const char* progName);