From b9e92c416f2bcb39148a65439bc217419ef44920 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 3 Jul 2020 09:48:01 -0400 Subject: [PATCH 1/9] Implement round-robin scheduling for FST240W mode. --- widgets/mainwindow.cpp | 16 ++++++++++++++-- widgets/mainwindow.ui | 38 +++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 8e80c3e92..7abe31420 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -4078,7 +4078,7 @@ void MainWindow::guiUpdate() //Once per second: if(nsec != m_sec0) { -// qDebug() << "onesec" << m_mode; +// qDebug() << "onesec" << ui->RoundRobin->currentText(); m_currentBand=m_config.bands()->find(m_freqNominal); if( SpecOp::HOUND == m_config.special_op_id() ) { qint32 tHound=QDateTime::currentMSecsSinceEpoch()/1000 - m_tAutoOn; @@ -5844,7 +5844,7 @@ void MainWindow::on_actionFST240W_triggered() m_TRperiod = ui->sbTR_FST240W->value (); ui->band_hopping_group_box->setVisible(false); int ntr=m_TRperiod; - ui->sbTR_FST240W->setMinimum(15); //### 120 ?? ### + ui->sbTR_FST240W->setMinimum(15); ui->sbTR_FST240W->setMaximum(300); ui->sbTR_FST240W->setValue(120); //### Why is all this necessary? ### ui->sbTR_FST240W->setValue(300); @@ -7899,6 +7899,18 @@ void MainWindow::on_pbTxNext_clicked(bool b) void MainWindow::WSPR_scheduling () { + QString t=ui->RoundRobin->currentText(); + if(m_mode=="FST240W" and t!="Random") { + int i=t.left(1).toInt(); + int n=t.right(1).toInt(); + + qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000; + int nsec=ms/1000; + int ntr=m_TRperiod; + int j=(nsec % (n*ntr))/ntr + 1; + m_WSPR_tx_next=(i==j); + return; + } m_WSPR_tx_next = false; if (m_config.is_transceiver_online () // need working rig control for hopping && !m_config.is_dummy_rig () diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 7e0fc103a..31bdefcc4 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -2631,6 +2631,43 @@ list. The list can be maintained in Settings (F2). + + + + 0 + + + + Random + + + + + 1/2 + + + + + 2/2 + + + + + 1/3 + + + + + 2/3 + + + + + 3/3 + + + + @@ -2876,7 +2913,6 @@ list. The list can be maintained in Settings (F2). - From f9e9a4e1ec4e86caf1638e53c4c33270cff412dd Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 3 Jul 2020 09:58:52 -0400 Subject: [PATCH 2/9] Don't let mouse-click on WindGraph move frequencies in FST240W mode. --- widgets/plotter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/plotter.cpp b/widgets/plotter.cpp index 41bf173fe..160f55b10 100644 --- a/widgets/plotter.cpp +++ b/widgets/plotter.cpp @@ -697,7 +697,7 @@ int CPlotter::rxFreq() {return m_rxFreq;} //rxFreq void CPlotter::mouseReleaseEvent (QMouseEvent * event) { - if (Qt::LeftButton == event->button ()) { + if (Qt::LeftButton == event->button () and m_mode!="FST240W") { int x=event->x(); if(x<0) x=0; if(x>m_Size.width()) x=m_Size.width(); From 15014685acbca0652001dd731c485e58d275216b Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 3 Jul 2020 10:05:16 -0400 Subject: [PATCH 3/9] Round-robin control should be visible only in FST240W mode. --- widgets/mainwindow.cpp | 1 + widgets/mainwindow.ui | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 7abe31420..b321cf268 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -6464,6 +6464,7 @@ void MainWindow::WSPR_config(bool b) ui->logQSOButton->setVisible(!b); ui->DecodeButton->setEnabled(!b); ui->band_hopping_group_box->setVisible(true); + ui->RoundRobin->setVisible(b and (m_mode=="FST240W")); if(b and m_mode!="Echo" and m_mode!="FST240W") { QString t="UTC dB DT Freq Drift Call Grid dBm "; if(m_config.miles()) t += " mi"; diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 31bdefcc4..c66488293 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -2697,7 +2697,7 @@ list. The list can be maintained in Settings (F2). 6 digit locators cause 2 different messages to be sent, the second contains the full locator but only a hashed callsign, other stations must have decoded the first once before they can decode your call in the second. Check this option to only send 4 digit locators if it will avoid the two message protocol. - Prefer type 1 messages + Prefer Type 1 messages true From cbca2f2d8099fd2ccbc9e1a41898c38a2d4eeb04 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 3 Jul 2020 10:06:52 -0400 Subject: [PATCH 4/9] No band-hopping in FST240W mode. --- widgets/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index b321cf268..d7201d286 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -5842,6 +5842,7 @@ void MainWindow::on_actionFST240W_triggered() bool bVHF=m_config.enable_VHF_features(); setup_status_bar (bVHF); m_TRperiod = ui->sbTR_FST240W->value (); + ui->band_hopping_group_box->setChecked(false); ui->band_hopping_group_box->setVisible(false); int ntr=m_TRperiod; ui->sbTR_FST240W->setMinimum(15); From 4a0b7b3a1d4769ea3eb601feb864a860f15beb60 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 3 Jul 2020 12:01:26 -0400 Subject: [PATCH 5/9] Fix the "FST240W Type 2" and "FST240W Type 3" messages. --- lib/77bit/packjt77.f90 | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/lib/77bit/packjt77.f90 b/lib/77bit/packjt77.f90 index c064f7cea..b3b1a83ea 100644 --- a/lib/77bit/packjt77.f90 +++ b/lib/77bit/packjt77.f90 @@ -203,7 +203,7 @@ subroutine unpack77(c77,nrx,msg,unpk77_success) integer ntel(3) character*77 c77 character*37 msg - character*13 call_1,call_2,call_3 + character*13 call_1,call_2,call_3,call_1a character*13 mycall13_0,dxcall13_0 character*11 c11 character*3 crpt,cntx,cpfx @@ -350,11 +350,11 @@ subroutine unpack77(c77,nrx,msg,unpk77_success) msg=adjustl(msg) else if(i3.eq.0 .and. n3.eq.6) then - read(c77(50:50),'(b1)') j2a - j2b=0 - if(j2a.eq.0) read(c77(49:49),'(b1)') j2b - j2=2*j2a+j2b - if(j2.eq.0) then + read(c77(49:50),'(2b1)') j2a,j2b + itype=2 + if(j2b.eq.0 .and. j2a.eq.0) itype=1 + if(j2b.eq.0 .and. j2a.eq.1) itype=3 + if(itype.eq.1) then ! WSPR Type 1 read(c77,2010) n28,igrid4,idbm 2010 format(b28.28,b15.15,b5.5) @@ -364,18 +364,10 @@ subroutine unpack77(c77,nrx,msg,unpk77_success) call to_grid4(igrid4,grid4) write(crpt,'(i3)') idbm msg=trim(call_1)//' '//grid4//' '//trim(adjustl(crpt)) + call save_hash_call(call_1,n10,n12,n22) !### Is this OK here? ### - else if(j2.eq.1) then + else if(itype.eq.2) then ! WSPR Type 2 - read(c77,2030) n28,igrid6 -2030 format(b22.22,b25.25) - call unpack28(n28,call_1,unpk28_success) - if(.not.unpk28_success) unpk77_success=.false. - call to_grid6(igrid6,grid6) - msg=trim(call_1)//' '//grid6 - - else if(j2.eq.2) then -! WSPR Type 3 read(c77,2020) n28,npfx,idbm 2020 format(b28.28,b16.16,b5.5) idbm=nint(idbm*10.0/3.0) @@ -391,6 +383,8 @@ subroutine unpack77(c77,nrx,msg,unpk77_success) if(npfx.eq.0) exit enddo msg=trim(adjustl(cpfx))//'/'//trim(call_1)//' '//trim(adjustl(crpt)) + call_1a=trim(adjustl(cpfx))//'/'//trim(call_1) + call save_hash_call(call_1a,n10,n12,n22) !### Is this OK here? ### else ! Suffix npfx=npfx-nzzz @@ -409,7 +403,20 @@ subroutine unpack77(c77,nrx,msg,unpk77_success) return endif msg=trim(call_1)//'/'//trim(adjustl(cpfx))//' '//trim(adjustl(crpt)) + call_1a=trim(call_1)//'/'//trim(adjustl(cpfx)) + call save_hash_call(call_1a,n10,n12,n22) !### Is this OK here? ### endif + + else if(itype.eq.3) then +! WSPR Type 3 + read(c77,2030) n22,igrid6 +2030 format(b22.22,b25.25) + n28=n22+2063592 + call unpack28(n28,call_1,unpk28_success) + if(.not.unpk28_success) unpk77_success=.false. + call to_grid6(igrid6,grid6) + msg=trim(call_1)//' '//grid6 + endif @@ -1032,6 +1039,7 @@ subroutine pack77_06(nwords,w,i3,n3,c77) i3=0 n3=6 call pack28(w(1),n28) + n22=n28-2063592 k1=(ichar(grid6(1:1))-ichar('A'))*18*10*10*24*24 k2=(ichar(grid6(2:2))-ichar('A'))*10*10*24*24 k3=(ichar(grid6(3:3))-ichar('0'))*10*24*24 @@ -1039,7 +1047,7 @@ subroutine pack77_06(nwords,w,i3,n3,c77) k5=(ichar(grid6(5:5))-ichar('A'))*24 k6=(ichar(grid6(6:6))-ichar('A')) igrid6=k1+k2+k3+k4+k5+k6 - write(c77,1030) n28,igrid6,2,0,n3,i3 + write(c77,1030) n22,igrid6,2,0,n3,i3 1030 format(b22.22,b25.25,b3.3,b21.21,2b3.3) endif From d4bf73df84c890a11715b2d7d8683acfbbb6941c Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 3 Jul 2020 14:17:13 -0400 Subject: [PATCH 6/9] Minor cleanup of RoundRobin control. --- widgets/mainwindow.cpp | 9 ++++++++- widgets/mainwindow.h | 1 + widgets/mainwindow.ui | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index d7201d286..48767a8f4 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -5574,6 +5574,12 @@ void MainWindow::on_tx6_editingFinished() //tx6 edited msgtype(t, ui->tx6); } +void MainWindow::on_RoundRobin_currentTextChanged(QString text) +{ + ui->sbTxPercent->setEnabled(text=="Random"); +} + + void MainWindow::on_dxCallEntry_textChanged (QString const& call) { m_hisCall = call; @@ -6465,7 +6471,8 @@ void MainWindow::WSPR_config(bool b) ui->logQSOButton->setVisible(!b); ui->DecodeButton->setEnabled(!b); ui->band_hopping_group_box->setVisible(true); - ui->RoundRobin->setVisible(b and (m_mode=="FST240W")); + ui->RoundRobin->setVisible(m_mode=="FST240W"); + ui->RoundRobin->lineEdit()->setAlignment(Qt::AlignCenter); if(b and m_mode!="Echo" and m_mode!="FST240W") { QString t="UTC dB DT Freq Drift Call Grid dBm "; if(m_config.miles()) t += " mi"; diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 646486fb5..c2b73bf23 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -316,6 +316,7 @@ private slots: void not_GA_warning_message (); void checkMSK144ContestType(); void on_pbBestSP_clicked(); + void on_RoundRobin_currentTextChanged(QString text); int setTxMsg(int n); bool stdCall(QString const& w); void remote_configure (QString const& mode, quint32 frequency_tolerance, QString const& submode diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index c66488293..91d8e95ba 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -2633,6 +2633,9 @@ list. The list can be maintained in Settings (F2). + + true + 0 From bdfca55d1653c3b7aa537a8161397b277f5b09df Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 3 Jul 2020 18:46:58 -0400 Subject: [PATCH 7/9] Fix two remaining references to FST280. Should be FST240. --- models/Modes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/Modes.cpp b/models/Modes.cpp index 1b1febfa8..d337fafd5 100644 --- a/models/Modes.cpp +++ b/models/Modes.cpp @@ -25,8 +25,8 @@ namespace "FreqCal", "FT8", "FT4", - "FST280", - "FST280W" + "FST240", + "FST240W" }; std::size_t constexpr mode_names_size = sizeof (mode_names) / sizeof (mode_names[0]); } From 5e4f77c6a921a18243eb8317043ebe9bb2cd601c Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 3 Jul 2020 18:55:29 -0400 Subject: [PATCH 8/9] Set initial default frequencies for FST240W to WSPR freq +200 Hz. --- models/FrequencyList.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/models/FrequencyList.cpp b/models/FrequencyList.cpp index 056950611..d91fbab27 100644 --- a/models/FrequencyList.cpp +++ b/models/FrequencyList.cpp @@ -46,7 +46,7 @@ namespace {20000000, Modes::FreqCal, IARURegions::ALL}, {136000, Modes::WSPR, IARURegions::ALL}, - {136000, Modes::FST240W, IARURegions::ALL}, + {136200, Modes::FST240W, IARURegions::ALL}, {136130, Modes::JT65, IARURegions::ALL}, {136130, Modes::JT9, IARURegions::ALL}, {136130, Modes::FST240, IARURegions::ALL}, @@ -55,7 +55,7 @@ namespace {474200, Modes::JT9, IARURegions::ALL}, {474200, Modes::FST240, IARURegions::ALL}, {474200, Modes::WSPR, IARURegions::ALL}, - {474200, Modes::FST240W, IARURegions::ALL}, + {474400, Modes::FST240W, IARURegions::ALL}, {1836600, Modes::WSPR, IARURegions::ALL}, {1838000, Modes::JT65, IARURegions::ALL}, // squeezed allocations @@ -95,6 +95,7 @@ namespace {3572000, Modes::FST240, IARURegions::ALL}, {3573000, Modes::FT8, IARURegions::ALL}, // above as below JT65 is out of DM allocation {3568600, Modes::WSPR, IARURegions::ALL}, // needs guard marker and lock out + {3568800, Modes::FST240W, IARURegions::ALL}, {3575000, Modes::FT4, IARURegions::ALL}, // provisional {3568000, Modes::FT4, IARURegions::R3}, // provisional @@ -130,6 +131,7 @@ namespace // 7110 LSB EMCOMM // {7038600, Modes::WSPR, IARURegions::ALL}, + {7038800, Modes::FST240W, IARURegions::ALL}, {7074000, Modes::FT8, IARURegions::ALL}, {7076000, Modes::JT65, IARURegions::ALL}, {7078000, Modes::JT9, IARURegions::ALL}, @@ -167,6 +169,7 @@ namespace {10136000, Modes::FT8, IARURegions::ALL}, {10138000, Modes::JT65, IARURegions::ALL}, {10138700, Modes::WSPR, IARURegions::ALL}, + {10138900, Modes::FST240W, IARURegions::ALL}, {10140000, Modes::JT9, IARURegions::ALL}, {10140000, Modes::FST240, IARURegions::ALL}, {10140000, Modes::FT4, IARURegions::ALL}, // provisional @@ -209,6 +212,7 @@ namespace // 14106.5 OLIVIA 1000 (main QRG) // {14095600, Modes::WSPR, IARURegions::ALL}, + {14095800, Modes::FST240W, IARURegions::ALL}, {14074000, Modes::FT8, IARURegions::ALL}, {14076000, Modes::JT65, IARURegions::ALL}, {14078000, Modes::JT9, IARURegions::ALL}, @@ -248,12 +252,14 @@ namespace {18104000, Modes::FST240, IARURegions::ALL}, {18104000, Modes::FT4, IARURegions::ALL}, // provisional {18104600, Modes::WSPR, IARURegions::ALL}, - + {18104800, Modes::FST240W, IARURegions::ALL}, + {21074000, Modes::FT8, IARURegions::ALL}, {21076000, Modes::JT65, IARURegions::ALL}, {21078000, Modes::JT9, IARURegions::ALL}, {21078000, Modes::FST240, IARURegions::ALL}, {21094600, Modes::WSPR, IARURegions::ALL}, + {21094800, Modes::FST240W, IARURegions::ALL}, {21140000, Modes::FT4, IARURegions::ALL}, {24915000, Modes::FT8, IARURegions::ALL}, @@ -262,12 +268,14 @@ namespace {24919000, Modes::FST240, IARURegions::ALL}, {24919000, Modes::FT4, IARURegions::ALL}, // provisional {24924600, Modes::WSPR, IARURegions::ALL}, - + {24924800, Modes::FST240W, IARURegions::ALL}, + {28074000, Modes::FT8, IARURegions::ALL}, {28076000, Modes::JT65, IARURegions::ALL}, {28078000, Modes::JT9, IARURegions::ALL}, {28078000, Modes::FST240, IARURegions::ALL}, {28124600, Modes::WSPR, IARURegions::ALL}, + {28124800, Modes::FST240W, IARURegions::ALL}, {28180000, Modes::FT4, IARURegions::ALL}, {50200000, Modes::Echo, IARURegions::ALL}, @@ -278,6 +286,8 @@ namespace {50260000, Modes::MSK144, IARURegions::R3}, {50293000, Modes::WSPR, IARURegions::R2}, {50293000, Modes::WSPR, IARURegions::R3}, + {50293200, Modes::FST240W, IARURegions::R2}, + {50293200, Modes::FST240W, IARURegions::R3}, {50310000, Modes::JT65, IARURegions::ALL}, {50312000, Modes::JT9, IARURegions::ALL}, {50312000, Modes::FST240, IARURegions::ALL}, @@ -289,6 +299,7 @@ namespace {70102000, Modes::JT65, IARURegions::R1}, {70104000, Modes::JT9, IARURegions::R1}, {70091000, Modes::WSPR, IARURegions::R1}, + {70091200, Modes::FST240W, IARURegions::R2}, {70230000, Modes::MSK144, IARURegions::R1}, {144120000, Modes::JT65, IARURegions::ALL}, @@ -298,6 +309,7 @@ namespace {144360000, Modes::MSK144, IARURegions::R1}, {144150000, Modes::MSK144, IARURegions::R2}, {144489000, Modes::WSPR, IARURegions::ALL}, + {144489200, Modes::FST240W, IARURegions::R2}, {144120000, Modes::QRA64, IARURegions::ALL}, {222065000, Modes::Echo, IARURegions::R2}, From 24113a5c05d6dfd1d8a61d17ac1cac2849c7924d Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 3 Jul 2020 18:59:00 -0400 Subject: [PATCH 9/9] One more frequency for FST240W. --- models/FrequencyList.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/models/FrequencyList.cpp b/models/FrequencyList.cpp index d91fbab27..74bc0ef64 100644 --- a/models/FrequencyList.cpp +++ b/models/FrequencyList.cpp @@ -58,6 +58,7 @@ namespace {474400, Modes::FST240W, IARURegions::ALL}, {1836600, Modes::WSPR, IARURegions::ALL}, + {1836800, Modes::FST240W, IARURegions::ALL}, {1838000, Modes::JT65, IARURegions::ALL}, // squeezed allocations {1839000, Modes::JT9, IARURegions::ALL}, {1839000, Modes::FST240, IARURegions::ALL},