From 9200c3e27a594df1a872af2516bafb84e9fa7b32 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 30 Sep 2020 13:32:03 -0400 Subject: [PATCH] Add NB = -3% option to cycle through NB=0, 1, 2, 3, ... 20%. --- lib/fst4_decode.f90 | 6 ++++-- widgets/mainwindow.cpp | 2 +- widgets/mainwindow.ui | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/fst4_decode.f90 b/lib/fst4_decode.f90 index e97d8f096..ba49fb54d 100644 --- a/lib/fst4_decode.f90 +++ b/lib/fst4_decode.f90 @@ -227,7 +227,7 @@ contains ndropmax=1 single_decode=iand(nexp_decode,32).ne.0 npct=0 - nb=nexp_decode/256 - 2 + nb=nexp_decode/256 - 3 if(nb.ge.0) npct=nb inb1=20 inb2=5 @@ -235,6 +235,8 @@ contains inb2=5 !Try NB = 0, 5, 10, 15, 20% else if(nb.eq.-2) then inb2=2 !Try NB = 0, 2, 4,... 20% + else if(nb.eq.-3) then + inb2=1 !Try NB = 0, 1, 2,... 20% else inb1=0 !Fixed NB value, 0 to 25% ipct(0)=npct @@ -900,6 +902,6 @@ contains enddo return - end subroutine dopspread + end subroutine dopspread end module fst4_decode diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 6d5b01e58..8df2966f1 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3120,7 +3120,7 @@ void MainWindow::decode() //decode() dec_data.params.nexp_decode = static_cast (m_config.special_op_id()); if(m_config.single_decode()) dec_data.params.nexp_decode += 32; if(m_config.enable_VHF_features()) dec_data.params.nexp_decode += 64; - if(m_mode.startsWith("FST4")) dec_data.params.nexp_decode += 256*(ui->sbNB->value()+2); + if(m_mode.startsWith("FST4")) dec_data.params.nexp_decode += 256*(ui->sbNB->value()+3); ::memcpy(dec_data.params.datetime, m_dateTime.toLatin1()+" ", sizeof dec_data.params.datetime); ::memcpy(dec_data.params.mycall, (m_config.my_callsign()+" ").toLatin1(), sizeof dec_data.params.mycall); diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index bf80c09ac..bf7ac9885 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -2471,7 +2471,7 @@ Yellow when too low NB - -2 + -3 25