From 2ec0a54d2a2da61580f792870d99fad67d1da650 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 22 Mar 2024 14:00:03 -0400 Subject: [PATCH] Pass state of "More CQs" checkbox to sftx in cmsg(1)(40:40). --- commons.h | 1 + lib/ft8/foxgen.f90 | 6 +++--- lib/ft8/foxgen_wrap.f90 | 4 ++-- widgets/mainwindow.cpp | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/commons.h b/commons.h index d568d34b4..2704c6f2e 100644 --- a/commons.h +++ b/commons.h @@ -93,6 +93,7 @@ extern struct { int i3bit[5]; char cmsg[5][40]; char mycall[12]; + bool bMoreCQs; } foxcom_; #ifdef __cplusplus diff --git a/lib/ft8/foxgen.f90 b/lib/ft8/foxgen.f90 index 38c17285c..4dbebad95 100644 --- a/lib/ft8/foxgen.f90 +++ b/lib/ft8/foxgen.f90 @@ -17,7 +17,7 @@ subroutine foxgen(bSuperFox,fname) parameter (NN=79,ND=58,NSPS=4*1920) parameter (NWAVE=(160+2)*134400*4) !the biggest waveform we generate (FST4-1800 at 48kHz) parameter (NFFT=614400,NH=NFFT/2) - logical*1 bSuperFox + logical*1 bSuperFox,bMoreCQs character*(*) fname character*40 cmsg character*37 msg,msgsent @@ -27,12 +27,12 @@ subroutine foxgen(bSuperFox,fname) real x(NFFT) real*8 dt,twopi,f0,fstep,dfreq,phi,dphi complex cx(0:NH) - common/foxcom/wave(NWAVE),nslots,nfreq,i3bit(5),cmsg(5),mycall(12) + common/foxcom/wave(NWAVE),nslots,nfreq,i3bit(5),cmsg(5),mycall(12),bMoreCQs common/foxcom2/itone2(NN),msgbits2(77) equivalence (x,cx),(y,cy) if(bSuperFox) then -! call foxgen2(nslots,cmsg,cmnd) + if(bMoreCQs) cmsg(1)(40:40)='1' open(25,file=fname,status='unknown') rewind(25) write(25,'(a40)') cmsg(1:nslots) diff --git a/lib/ft8/foxgen_wrap.f90 b/lib/ft8/foxgen_wrap.f90 index 825107607..170b93fc0 100644 --- a/lib/ft8/foxgen_wrap.f90 +++ b/lib/ft8/foxgen_wrap.f90 @@ -2,12 +2,12 @@ subroutine foxgen_wrap(msg40,msgbits,itone) parameter (NN=79,ND=58,KK=77,NSPS=4*1920) parameter (NWAVE=(160+2)*134400*4) !the biggest waveform we generate (FST4-1800) - + logical*1 bMoreCQs character*40 msg40,cmsg character*12 mycall12 integer*1 msgbits(KK),msgbits2 integer itone(NN) - common/foxcom/wave(NWAVE),nslots,nfreq,i3bit(5),cmsg(5),mycall12 + common/foxcom/wave(NWAVE),nslots,nfreq,i3bit(5),cmsg(5),mycall12,bMoreCQs common/foxcom2/itone2(NN),msgbits2(KK) nslots=1 diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 8090af811..c93afcc57 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -4833,6 +4833,7 @@ void MainWindow::guiUpdate() ::memcpy(foxcom_.mycall, foxCall.toLatin1(), sizeof foxcom_.mycall); //Copy Fox callsign into foxcom_ bool bSuperFox=m_config.superFox(); auto fname {QDir::toNativeSeparators(m_config.writeable_data_dir().absoluteFilePath("sfox_1.dat")).toLocal8Bit()}; + foxcom_.bMoreCQs=ui->cbMoreCQs->isChecked(); foxgen_(&bSuperFox, fname.constData(), (FCL)fname.size()); if(bSuperFox) sfox_tx(); }