diff --git a/lib/fsk4hf/genwspr5.f90 b/lib/fsk4hf/genwspr5.f90 index c052fa2ce..9385a8e14 100644 --- a/lib/fsk4hf/genwspr5.f90 +++ b/lib/fsk4hf/genwspr5.f90 @@ -1,4 +1,4 @@ -subroutine genwspr5(msg,ichk,msgsent,itone,itype) +subroutine genwspr5(msg,msgsent,itone) ! Encode a WSPR-LF message, producing array itone(). diff --git a/lib/fsk4hf/wspr5sim.f90 b/lib/fsk4hf/wspr5sim.f90 index c7326a2dc..ea84540ff 100644 --- a/lib/fsk4hf/wspr5sim.f90 +++ b/lib/fsk4hf/wspr5sim.f90 @@ -46,7 +46,7 @@ program wspr5sim if(snrdb.gt.90.0) sig=1.0 txt=NN*NSPS0/12000.0 - call genwspr5(msg,ichk,msgsent,itone,itype) !Encode the message, get itone + call genwspr5(msg,msgsent,itone) !Encode the message, get itone write(*,1000) f0,xdt,txt,snrdb,nfiles,msgsent 1000 format('f0:',f9.3,' DT:',f6.2,' txt:',f6.1,' SNR:',f6.1, & ' nfiles:',i3,2x,a22) diff --git a/mainwindow.cpp b/mainwindow.cpp index 5bd437077..30766fcc7 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -94,6 +94,8 @@ extern "C" { void genwspr_(char* msg, char* msgsent, int itone[], int len1, int len2); + void genwspr5_(char* msg, char* msgsent, int itone[], int len1, int len2); + void geniscat_(char* msg, char* msgsent, int itone[], int len1, int len2); bool stdmsg_(const char* msg, int len); @@ -1255,7 +1257,7 @@ void MainWindow::dataSink(qint64 frames) m_saveWAVWatcher.setFuture (QtConcurrent::run (std::bind (&MainWindow::save_wave_file, this, m_fnameWE, &dec_data.d2[0], m_TRperiod, m_config.my_callsign(), m_config.my_grid(), m_mode, m_nSubMode, m_freqNominal, m_hisCall, m_hisGrid))); - if (m_mode.startsWith ("WSPR")) { + if (m_mode=="WSPR") { QString c2name_string {m_fnameWE + ".c2"}; int len1=c2name_string.length(); char c2name[80]; @@ -2967,7 +2969,9 @@ void MainWindow::guiUpdate() if(m_mode=="QRA64") genqra64_(message, &ichk, msgsent, const_cast (itone), &m_currentMessageType, len1, len1); if(m_mode=="WSPR") genwspr_(message, msgsent, const_cast (itone), - len1, len1); + len1, len1); + if(m_mode=="WSPR-LF") genwspr5_(message, msgsent, const_cast (itone), + len1, len1); if(m_modeTx=="MSK144") { bool bcontest=m_config.contestMode(); char MyGrid[6]; @@ -5371,8 +5375,7 @@ void MainWindow::transmit (double snr) toneSpacing, m_soundOutput, m_config.audio_output_channel (), true, false, snr, m_TRperiod); } - if (m_mode=="WSPR") { //### Similar code would be needed for WSPR-15 ### - + if (m_mode=="WSPR") { int nToneSpacing=1; if(m_config.x2ToneSpacing()) nToneSpacing=2; Q_EMIT sendMessage (NUM_WSPR_SYMBOLS, 8192.0, @@ -5381,6 +5384,13 @@ void MainWindow::transmit (double snr) m_config.audio_output_channel(),true, false, snr, m_TRperiod); } + if (m_mode=="WSPR-LF") { + Q_EMIT sendMessage (NUM_WSPR_LF_SYMBOLS, 8640.0, + ui->TxFreqSpinBox->value(), + m_toneSpacing, m_soundOutput, + m_config.audio_output_channel(),true, false, snr, + m_TRperiod); + } if(m_mode=="Echo") { //??? should use "fastMode = true" here ??? Q_EMIT sendMessage (27, 1024.0, 1500.0, 0.0, m_soundOutput, diff --git a/mainwindow.h b/mainwindow.h index e2c1c2bc7..5bf9f9138 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -43,6 +43,7 @@ #define NUM_JT65_SYMBOLS 126 //63 data + 63 sync #define NUM_JT9_SYMBOLS 85 //69 data + 16 sync #define NUM_WSPR_SYMBOLS 162 //(50+31)*2, embedded sync +#define NUM_WSPR_LF_SYMBOLS 412 //300 data + 109 sync + 3 ramp #define NUM_ISCAT_SYMBOLS 1291 //30*11025/256 #define NUM_MSK144_SYMBOLS 144 //s8 + d48 + s8 + d80 #define NUM_QRA64_SYMBOLS 84 //63 data + 21 sync