From ceeafa5bedf3746e3db4440da1b2bb1347a8ce37 Mon Sep 17 00:00:00 2001 From: Joe Taylor <joe@princeton.edu> Date: Sat, 25 Jul 2020 16:02:42 -0400 Subject: [PATCH] *** TEMPORARY *** Add a feature to transmit FT8 and FST4 at the same time. --- widgets/mainwindow.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index d7be5cc6c..a2dc97dcc 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3837,7 +3837,11 @@ void MainWindow::guiUpdate() m_modulator->set_nsym(nsym); } } - if(m_modeTx=="FT8") { + + QString t = QString::fromStdString(message).trimmed(); + bool both=(t=="CQ BOTH K1JT FN20" or t=="CQ BOTH K9AN EN50"); + + if(m_modeTx=="FT8" or both) { if(SpecOp::FOX==m_config.special_op_id() and ui->tabWidget->currentIndex()==2) { foxTxSequencer(); } else { @@ -3855,7 +3859,6 @@ void MainWindow::guiUpdate() int nwave=nsym*nsps; gen_ft8wave_(const_cast<int *>(itone),&nsym,&nsps,&bt,&fsample,&f0,foxcom_.wave, foxcom_.wave,&icmplx,&nwave); - if(SpecOp::FOX == m_config.special_op_id()) { //Fox must generate the full Tx waveform, not just an itone[] array. QString fm = QString::fromStdString(message).trimmed(); @@ -3911,8 +3914,20 @@ void MainWindow::guiUpdate() float f0=ui->TxFreqSpinBox->value() - m_XIT + 1.5*dfreq; int nwave=(nsym+2)*nsps; int icmplx=0; + + float wave_both[15*48000]; + if(both) { + memcpy(wave_both,foxcom_.wave,4*15*48000); //Copy the FT8 wave[] into wave_both[] + f0 += 200; + } gen_fst4wave_(const_cast<int *>(itone),&nsym,&nsps,&nwave, &fsample,&hmod,&f0,&icmplx,foxcom_.wave,foxcom_.wave); + if(both) { + for(int i=0; i<15*48000; i++) { + foxcom_.wave[i]=0.5*(wave_both[i] + foxcom_.wave[i]); + } + } + } if(SpecOp::EU_VHF==m_config.special_op_id()) {