Clean up js8d to jd8e to make it clear the difference

This commit is contained in:
Jordan Sherer 2019-11-06 16:00:16 -05:00
parent 9e77bc5d28
commit a43c913a19
16 changed files with 142 additions and 110 deletions

View File

@ -300,8 +300,8 @@ set (wsjt_FSRCS
lib/js8b_decode.f90 lib/js8b_decode.f90
lib/js8c_module.f90 lib/js8c_module.f90
lib/js8c_decode.f90 lib/js8c_decode.f90
lib/js8d_module.f90 lib/js8e_module.f90
lib/js8d_decode.f90 lib/js8e_decode.f90
# remaining non-module sources # remaining non-module sources
lib/addit.f90 lib/addit.f90
@ -417,7 +417,7 @@ set (wsjt_FSRCS
lib/ft8/ldpcsim174.f90 lib/ft8/ldpcsim174.f90
lib/js8/ldpcsim174js8b.f90 lib/js8/ldpcsim174js8b.f90
lib/js8/ldpcsim174js8c.f90 lib/js8/ldpcsim174js8c.f90
lib/js8/ldpcsim174js8d.f90 lib/js8/ldpcsim174js8e.f90
lib/ldpcsim40.f90 lib/ldpcsim40.f90
lib/libration.f90 lib/libration.f90
lib/lorentzian.f90 lib/lorentzian.f90
@ -1001,8 +1001,8 @@ target_link_libraries (ldpcsim174js8b wsjt_fort wsjt_cxx)
add_executable (ldpcsim174js8c lib/js8/ldpcsim174js8c.f90 wsjtx.rc) add_executable (ldpcsim174js8c lib/js8/ldpcsim174js8c.f90 wsjtx.rc)
target_link_libraries (ldpcsim174js8c wsjt_fort wsjt_cxx) target_link_libraries (ldpcsim174js8c wsjt_fort wsjt_cxx)
add_executable (ldpcsim174js8d lib/js8/ldpcsim174js8d.f90 wsjtx.rc) add_executable (ldpcsim174js8e lib/js8/ldpcsim174js8e.f90 wsjtx.rc)
target_link_libraries (ldpcsim174js8d wsjt_fort wsjt_cxx) target_link_libraries (ldpcsim174js8e wsjt_fort wsjt_cxx)
add_executable (js8 ${js8_FSRCS} ${js8_CXXSRCS} wsjtx.rc) add_executable (js8 ${js8_FSRCS} ${js8_CXXSRCS} wsjtx.rc)
if (${OPENMP_FOUND} OR APPLE) if (${OPENMP_FOUND} OR APPLE)

View File

@ -81,8 +81,8 @@ void Modulator::start (unsigned symbolsLength, double framesPerSymbol,
else if(m_TRperiod == JS8C_TX_SECONDS){ else if(m_TRperiod == JS8C_TX_SECONDS){
delay_ms = JS8C_START_DELAY_MS; delay_ms = JS8C_START_DELAY_MS;
} }
else if(m_TRperiod == JS8D_TX_SECONDS){ else if(m_TRperiod == JS8E_TX_SECONDS){
delay_ms = JS8D_START_DELAY_MS; delay_ms = JS8E_START_DELAY_MS;
} }
// noise generator parameters // noise generator parameters

View File

@ -15,7 +15,7 @@
#define JS8_ENABLE_JS8A 1 #define JS8_ENABLE_JS8A 1
#define JS8_ENABLE_JS8B 1 #define JS8_ENABLE_JS8B 1
#define JS8_ENABLE_JS8C 1 #define JS8_ENABLE_JS8C 1
#define JS8_ENABLE_JS8D 0 #define JS8_ENABLE_JS8E 0
#define JS8A_SYMBOL_SAMPLES 1920 #define JS8A_SYMBOL_SAMPLES 1920
#define JS8A_TX_SECONDS 15 #define JS8A_TX_SECONDS 15
@ -29,15 +29,15 @@
#define JS8C_TX_SECONDS 6 #define JS8C_TX_SECONDS 6
#define JS8C_START_DELAY_MS 100 #define JS8C_START_DELAY_MS 100
#define JS8D_IS_ULTRA 1 #define JS8E_IS_ULTRA 0
#if JS8D_IS_ULTRA #if JS8E_IS_ULTRA
#define JS8D_SYMBOL_SAMPLES 384 #define JS8E_SYMBOL_SAMPLES 384
#define JS8D_TX_SECONDS 4 #define JS8E_TX_SECONDS 4
#define JS8D_START_DELAY_MS 100 #define JS8E_START_DELAY_MS 100
#else #else
#define JS8D_SYMBOL_SAMPLES 4000 #define JS8E_SYMBOL_SAMPLES 4000
#define JS8D_TX_SECONDS 30 #define JS8E_TX_SECONDS 30
#define JS8D_START_DELAY_MS 100 #define JS8E_START_DELAY_MS 100
#endif #endif
#ifndef TEST_FOX_WAVE_GEN #ifndef TEST_FOX_WAVE_GEN
@ -95,11 +95,11 @@ extern struct dec_data {
int kposA; // starting position of decode for submode A int kposA; // starting position of decode for submode A
int kposB; // starting position of decode for submode B int kposB; // starting position of decode for submode B
int kposC; // starting position of decode for submode C int kposC; // starting position of decode for submode C
int kposD; // starting position of decode for submode D int kposE; // starting position of decode for submode E
int kszA; // number of frames for decode for submode A int kszA; // number of frames for decode for submode A
int kszB; // number of frames for decode for submode B int kszB; // number of frames for decode for submode B
int kszC; // number of frames for decode for submode C int kszC; // number of frames for decode for submode C
int kszD; // number of frames for decode for submode D int kszE; // number of frames for decode for submode E
int nzhsym; // half symbol stop index int nzhsym; // half symbol stop index
int nsubmode; int nsubmode;
int nsubmodes; int nsubmodes;

View File

@ -264,7 +264,7 @@ bool DecodedText::tryUnpackFastData(){
return false; return false;
} }
if(submode_ != Varicode::JS8CallFast && submode_ != Varicode::JS8CallTurbo && submode_ != Varicode::JS8CallUltra){ if(submode_ != Varicode::JS8CallFast && submode_ != Varicode::JS8CallTurbo && submode_ != Varicode::JS8CallUltraSlow){
return false; return false;
} }

View File

@ -6,7 +6,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
use ft8_decode use ft8_decode
use js8b_decode use js8b_decode
use js8c_decode use js8c_decode
use js8d_decode use js8e_decode
include 'jt9com.f90' include 'jt9com.f90'
include 'timer_common.inc' include 'timer_common.inc'
@ -23,9 +23,9 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
integer :: decoded integer :: decoded
end type counting_js8c_decoder end type counting_js8c_decoder
type, extends(js8d_decoder) :: counting_js8d_decoder type, extends(js8e_decoder) :: counting_js8e_decoder
integer :: decoded integer :: decoded
end type counting_js8d_decoder end type counting_js8e_decoder
real ss(184,NSMAX) real ss(184,NSMAX)
logical baddata,newdat65,newdat9,single_decode,bVHF,bad0,newdat,trydecode logical baddata,newdat65,newdat9,single_decode,bVHF,bad0,newdat,trydecode
@ -39,7 +39,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
type(counting_ft8_decoder) :: my_js8a type(counting_ft8_decoder) :: my_js8a
type(counting_js8b_decoder) :: my_js8b type(counting_js8b_decoder) :: my_js8b
type(counting_js8c_decoder) :: my_js8c type(counting_js8c_decoder) :: my_js8c
type(counting_js8d_decoder) :: my_js8d type(counting_js8e_decoder) :: my_js8e
!cast C character arrays to Fortran character strings !cast C character arrays to Fortran character strings
datetime=transfer(params%datetime, datetime) datetime=transfer(params%datetime, datetime)
@ -52,7 +52,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
my_js8a%decoded = 0 my_js8a%decoded = 0
my_js8b%decoded = 0 my_js8b%decoded = 0
my_js8c%decoded = 0 my_js8c%decoded = 0
my_js8d%decoded = 0 my_js8e%decoded = 0
single_decode=iand(params%nexp_decode,32).ne.0 single_decode=iand(params%nexp_decode,32).ne.0
bVHF=iand(params%nexp_decode,64).ne.0 bVHF=iand(params%nexp_decode,64).ne.0
@ -82,23 +82,23 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
trydecode=.false. trydecode=.false.
if(params%nmode.eq.8 .and. (params%nsubmode.eq.4 .or. iand(params%nsubmodes, 8).eq.8)) then if(params%nmode.eq.8 .and. (params%nsubmode.eq.4 .or. iand(params%nsubmodes, 8).eq.8)) then
! We're in JS8 mode D ! We're in JS8 mode E
call timer('decjs8d ',0) call timer('decjs8e ',0)
newdat=params%newdat newdat=params%newdat
trydecode=.true. trydecode=.true.
! copy the relevant frames for decoding ! copy the relevant frames for decoding
pos = params%kposD pos = params%kposE
sz = params%kszD sz = params%kszE
id0=0 id0=0
id0(1:sz+1)=id2(pos+1:pos+sz+1) id0(1:sz+1)=id2(pos+1:pos+sz+1)
call my_js8d%decode(js8d_decoded,id0,params%nQSOProgress,params%nfqso, & call my_js8e%decode(js8e_decoded,id0,params%nQSOProgress,params%nfqso, &
params%nftx,newdat,params%nutc,params%nfa,params%nfb, & params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
params%nexp_decode,params%ndepth,logical(params%nagain), & params%nexp_decode,params%ndepth,logical(params%nagain), &
logical(params%lft8apon),logical(params%lapcqonly),params%napwid, & logical(params%lft8apon),logical(params%lapcqonly),params%napwid, &
mycall,mygrid,hiscall,hisgrid) mycall,mygrid,hiscall,hisgrid)
call timer('decjs8d ',1) call timer('decjs8e ',1)
endif endif
if(params%nmode.eq.8 .and. (params%nsubmode.eq.2 .or. iand(params%nsubmodes, 4).eq.4)) then if(params%nmode.eq.8 .and. (params%nsubmode.eq.2 .or. iand(params%nsubmodes, 4).eq.4)) then
@ -202,7 +202,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
!$call omp_set_dynamic(.true.) !$call omp_set_dynamic(.true.)
800 ndecoded = my_js8a%decoded + my_js8b%decoded + my_js8c%decoded + my_js8d%decoded 800 ndecoded = my_js8a%decoded + my_js8b%decoded + my_js8c%decoded + my_js8e%decoded
write(*,1010) nsynced,ndecoded write(*,1010) nsynced,ndecoded
1010 format('<DecodeFinished>',2i4) 1010 format('<DecodeFinished>',2i4)
call flush(6) call flush(6)
@ -260,7 +260,7 @@ contains
if(submode.eq.0) m=' A ' if(submode.eq.0) m=' A '
if(submode.eq.1) m=' B ' if(submode.eq.1) m=' B '
if(submode.eq.2) m=' C ' if(submode.eq.2) m=' C '
if(submode.eq.3) m=' D ' if(submode.eq.4) m=' E '
i0=index(decoded0,';') i0=index(decoded0,';')
@ -317,9 +317,11 @@ contains
character(len=37), intent(in) :: decoded character(len=37), intent(in) :: decoded
integer, intent(in) :: nap integer, intent(in) :: nap
real, intent(in) :: qual real, intent(in) :: qual
integer :: submode
save save
call js8_decoded(sync, snr, dt, freq, decoded, nap, qual, 0) submode=0
call js8_decoded(sync, snr, dt, freq, decoded, nap, qual, submode)
select type(this) select type(this)
type is (counting_ft8_decoder) type is (counting_ft8_decoder)
@ -341,9 +343,11 @@ contains
character(len=37), intent(in) :: decoded character(len=37), intent(in) :: decoded
integer, intent(in) :: nap integer, intent(in) :: nap
real, intent(in) :: qual real, intent(in) :: qual
integer :: submode
save save
call js8_decoded(sync, snr, dt, freq, decoded, nap, qual, 1) submode=1
call js8_decoded(sync, snr, dt, freq, decoded, nap, qual, submode)
select type(this) select type(this)
type is (counting_js8b_decoder) type is (counting_js8b_decoder)
@ -365,9 +369,11 @@ contains
character(len=37), intent(in) :: decoded character(len=37), intent(in) :: decoded
integer, intent(in) :: nap integer, intent(in) :: nap
real, intent(in) :: qual real, intent(in) :: qual
integer :: submode
save save
call js8_decoded(sync, snr, dt, freq, decoded, nap, qual, 2) submode=2
call js8_decoded(sync, snr, dt, freq, decoded, nap, qual, submode)
select type(this) select type(this)
type is (counting_js8c_decoder) type is (counting_js8c_decoder)
@ -377,11 +383,11 @@ contains
return return
end subroutine js8c_decoded end subroutine js8c_decoded
subroutine js8d_decoded (this,sync,snr,dt,freq,decoded,nap,qual) subroutine js8e_decoded (this,sync,snr,dt,freq,decoded,nap,qual)
use js8d_decode use js8e_decode
implicit none implicit none
class(js8d_decoder), intent(inout) :: this class(js8e_decoder), intent(inout) :: this
real, intent(in) :: sync real, intent(in) :: sync
integer, intent(in) :: snr integer, intent(in) :: snr
real, intent(in) :: dt real, intent(in) :: dt
@ -389,16 +395,18 @@ contains
character(len=37), intent(in) :: decoded character(len=37), intent(in) :: decoded
integer, intent(in) :: nap integer, intent(in) :: nap
real, intent(in) :: qual real, intent(in) :: qual
integer :: submode
save save
call js8_decoded(sync, snr, dt, freq, decoded, nap, qual, 3) submode=4
call js8_decoded(sync, snr, dt, freq, decoded, nap, qual, submode)
select type(this) select type(this)
type is (counting_js8d_decoder) type is (counting_js8e_decoder)
this%decoded = this%decoded + 1 this%decoded = this%decoded + 1
end select end select
return return
end subroutine js8d_decoded end subroutine js8e_decoded
end subroutine multimode_decoder end subroutine multimode_decoder

View File

@ -4,7 +4,7 @@ use crc
use packjt use packjt
include 'js8_params.f90' include 'js8_params.f90'
include 'js8d_params.f90' include 'js8e_params.f90'
character*22 msg,msgsent,msgreceived character*22 msg,msgsent,msgreceived
character*8 arg character*8 arg

View File

@ -1,16 +1,16 @@
module js8d_decode module js8e_decode
type :: js8d_decoder type :: js8e_decoder
procedure(js8d_decode_callback), pointer :: callback procedure(js8e_decode_callback), pointer :: callback
contains contains
procedure :: decode procedure :: decode
end type js8d_decoder end type js8e_decoder
abstract interface abstract interface
subroutine js8d_decode_callback (this,sync,snr,dt,freq,decoded,nap,qual) subroutine js8e_decode_callback (this,sync,snr,dt,freq,decoded,nap,qual)
import js8d_decoder import js8e_decoder
implicit none implicit none
class(js8d_decoder), intent(inout) :: this class(js8e_decoder), intent(inout) :: this
real, intent(in) :: sync real, intent(in) :: sync
integer, intent(in) :: snr integer, intent(in) :: snr
real, intent(in) :: dt real, intent(in) :: dt
@ -18,7 +18,7 @@ module js8d_decode
character(len=37), intent(in) :: decoded character(len=37), intent(in) :: decoded
integer, intent(in) :: nap integer, intent(in) :: nap
real, intent(in) :: qual real, intent(in) :: qual
end subroutine js8d_decode_callback end subroutine js8e_decode_callback
end interface end interface
contains contains
@ -29,10 +29,10 @@ contains
! use wavhdr ! use wavhdr
use timer_module, only: timer use timer_module, only: timer
! type(hdr) h ! type(hdr) h
use js8d_module use js8e_module
class(js8d_decoder), intent(inout) :: this class(js8e_decoder), intent(inout) :: this
procedure(js8d_decode_callback) :: callback procedure(js8e_decode_callback) :: callback
real s(NH1,NHSYM) real s(NH1,NHSYM)
real sbase(NH1) real sbase(NH1)
real candidate(3,200) real candidate(3,200)
@ -153,4 +153,4 @@ contains
return return
end subroutine decode end subroutine decode
end module js8d_decode end module js8e_decode

View File

@ -1,6 +1,6 @@
module js8d_module module js8e_module
include 'js8/js8_params.f90' include 'js8/js8_params.f90'
include 'js8/js8d_params.f90' include 'js8/js8e_params.f90'
contains contains
include 'js8/baselinejs8.f90' include 'js8/baselinejs8.f90'
@ -10,4 +10,4 @@ contains
include 'js8/genjs8refsig.f90' include 'js8/genjs8refsig.f90'
include 'js8/subtractjs8.f90' include 'js8/subtractjs8.f90'
include 'js8/js8dec.f90' include 'js8/js8dec.f90'
end module js8d_module end module js8e_module

View File

@ -290,7 +290,7 @@ program jt9
shared_data%params%kszA=NMAX-1 shared_data%params%kszA=NMAX-1
shared_data%params%kszB=NMAX-1 shared_data%params%kszB=NMAX-1
shared_data%params%kszC=NMAX-1 shared_data%params%kszC=NMAX-1
shared_data%params%kszD=NMAX-1 shared_data%params%kszE=NMAX-1
call multimode_decoder(shared_data%ss,shared_data%id2,shared_data%params,nfsample) call multimode_decoder(shared_data%ss,shared_data%id2,shared_data%params,nfsample)
enddo enddo

View File

@ -22,11 +22,11 @@
integer(c_int) :: kposA integer(c_int) :: kposA
integer(c_int) :: kposB integer(c_int) :: kposB
integer(c_int) :: kposC integer(c_int) :: kposC
integer(c_int) :: kposD integer(c_int) :: kposE
integer(c_int) :: kszA integer(c_int) :: kszA
integer(c_int) :: kszB integer(c_int) :: kszB
integer(c_int) :: kszC integer(c_int) :: kszC
integer(c_int) :: kszD integer(c_int) :: kszE
integer(c_int) :: nzhsym integer(c_int) :: nzhsym
integer(c_int) :: nsubmode integer(c_int) :: nsubmode
integer(c_int) :: nsubmodes integer(c_int) :: nsubmodes

View File

@ -1007,7 +1007,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->actionModeJS8Normal->setActionGroup(modeActionGroup); ui->actionModeJS8Normal->setActionGroup(modeActionGroup);
ui->actionModeJS8Fast->setActionGroup(modeActionGroup); ui->actionModeJS8Fast->setActionGroup(modeActionGroup);
ui->actionModeJS8Turbo->setActionGroup(modeActionGroup); ui->actionModeJS8Turbo->setActionGroup(modeActionGroup);
ui->actionModeJS8Ultra->setActionGroup(modeActionGroup); ui->actionModeJS8UltraSlow->setActionGroup(modeActionGroup);
auto mbmp = new MousePressEater(); auto mbmp = new MousePressEater();
connect(mbmp, &MousePressEater::mousePressed, this, [this](QObject *, QMouseEvent * e, bool *pProcessed){ connect(mbmp, &MousePressEater::mousePressed, this, [this](QObject *, QMouseEvent * e, bool *pProcessed){
@ -1024,8 +1024,14 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
if(!JS8_ENABLE_JS8C){ if(!JS8_ENABLE_JS8C){
ui->actionModeJS8Turbo->setVisible(false); ui->actionModeJS8Turbo->setVisible(false);
} }
if(!JS8_ENABLE_JS8D){ if(!JS8_ENABLE_JS8E){
ui->actionModeJS8Ultra->setVisible(false); ui->actionModeJS8UltraSlow->setVisible(false);
}
if(JS8_ENABLE_JS8E && !JS8E_IS_ULTRA){
// reorder so slow is at the top
ui->menuModeJS8->removeAction(ui->actionModeJS8UltraSlow);
ui->menuModeJS8->insertAction(ui->actionModeJS8Normal, ui->actionModeJS8UltraSlow);
ui->actionModeJS8UltraSlow->setText("JS8 (&Slow, 30s, 24Hz, ~8WPM)");
} }
// prep // prep
@ -2488,7 +2494,7 @@ int MainWindow::computeSubmodePeriod(int submode){
case Varicode::JS8CallNormal: return JS8A_TX_SECONDS; case Varicode::JS8CallNormal: return JS8A_TX_SECONDS;
case Varicode::JS8CallFast: return JS8B_TX_SECONDS; case Varicode::JS8CallFast: return JS8B_TX_SECONDS;
case Varicode::JS8CallTurbo: return JS8C_TX_SECONDS; case Varicode::JS8CallTurbo: return JS8C_TX_SECONDS;
case Varicode::JS8CallUltra: return JS8D_TX_SECONDS; case Varicode::JS8CallUltraSlow: return JS8E_TX_SECONDS;
} }
return 0; return 0;
@ -2518,7 +2524,16 @@ int MainWindow::computeStop(int submode, int period){
case Varicode::JS8CallNormal: symbolSamples = JS8A_SYMBOL_SAMPLES; /* threshold = 1.00 */ ; break; case Varicode::JS8CallNormal: symbolSamples = JS8A_SYMBOL_SAMPLES; /* threshold = 1.00 */ ; break;
case Varicode::JS8CallFast: symbolSamples = JS8B_SYMBOL_SAMPLES; /* threshold = 1.08 */ ; break; case Varicode::JS8CallFast: symbolSamples = JS8B_SYMBOL_SAMPLES; /* threshold = 1.08 */ ; break;
case Varicode::JS8CallTurbo: symbolSamples = JS8C_SYMBOL_SAMPLES; /* threshold = 0.50 */ ; break; case Varicode::JS8CallTurbo: symbolSamples = JS8C_SYMBOL_SAMPLES; /* threshold = 0.50 */ ; break;
case Varicode::JS8CallUltra: symbolSamples = JS8D_SYMBOL_SAMPLES; threshold = 0.00; break; case Varicode::JS8CallUltraSlow:
{
symbolSamples = JS8E_SYMBOL_SAMPLES;
#if JS8E_IS_ULTRA
threshold = 0.00;
#endif
break;
}
} }
stop = qFloor(float(symbolSamples*JS8_NUM_SYMBOLS + threshold*RX_SAMPLE_RATE)/(float)m_nsps*2.0); stop = qFloor(float(symbolSamples*JS8_NUM_SYMBOLS + threshold*RX_SAMPLE_RATE)/(float)m_nsps*2.0);
#endif #endif
@ -2742,7 +2757,7 @@ void MainWindow::on_menuModeJS8_aboutToShow(){
ui->actionModeJS8Normal->setEnabled(canChangeMode); ui->actionModeJS8Normal->setEnabled(canChangeMode);
ui->actionModeJS8Fast->setEnabled(canChangeMode); ui->actionModeJS8Fast->setEnabled(canChangeMode);
ui->actionModeJS8Turbo->setEnabled(canChangeMode); ui->actionModeJS8Turbo->setEnabled(canChangeMode);
ui->actionModeJS8Ultra->setEnabled(canChangeMode); ui->actionModeJS8UltraSlow->setEnabled(canChangeMode);
} }
void MainWindow::on_menuControl_aboutToShow(){ void MainWindow::on_menuControl_aboutToShow(){
@ -3244,7 +3259,7 @@ void MainWindow::setSubmode(int submode){
ui->actionModeJS8Normal->setChecked(submode == Varicode::JS8CallNormal); ui->actionModeJS8Normal->setChecked(submode == Varicode::JS8CallNormal);
ui->actionModeJS8Fast->setChecked(submode == Varicode::JS8CallFast); ui->actionModeJS8Fast->setChecked(submode == Varicode::JS8CallFast);
ui->actionModeJS8Turbo->setChecked(submode == Varicode::JS8CallTurbo); ui->actionModeJS8Turbo->setChecked(submode == Varicode::JS8CallTurbo);
ui->actionModeJS8Ultra->setChecked(submode == Varicode::JS8CallUltra); ui->actionModeJS8UltraSlow->setChecked(submode == Varicode::JS8CallUltraSlow);
on_actionJS8_triggered(); on_actionJS8_triggered();
} }
@ -3258,8 +3273,8 @@ int MainWindow::speedNameMode(QString speed){
if(speed == modeSpeedName(Varicode::JS8CallTurbo)){ if(speed == modeSpeedName(Varicode::JS8CallTurbo)){
return Varicode::JS8CallTurbo; return Varicode::JS8CallTurbo;
} }
if(speed == modeSpeedName(Varicode::JS8CallUltra)){ if(speed == modeSpeedName(Varicode::JS8CallUltraSlow)){
return Varicode::JS8CallUltra; return Varicode::JS8CallUltraSlow;
} }
return -1; return -1;
} }
@ -3275,8 +3290,8 @@ QString MainWindow::modeSpeedName(int submode){
else if(submode == Varicode::JS8CallTurbo){ else if(submode == Varicode::JS8CallTurbo){
return "TURBO"; return "TURBO";
} }
else if(submode == Varicode::JS8CallUltra){ else if(submode == Varicode::JS8CallUltraSlow){
#ifdef JS8D_IS_ULTRA #if JS8E_IS_ULTRA
return "ULTRA"; return "ULTRA";
#else #else
return "SLOW"; return "SLOW";
@ -3981,53 +3996,53 @@ bool MainWindow::decodeReady(int submode, int period, int *pSubmode, int *pPerio
qint32 framesNeededC = computeFramesNeededForDecode(Varicode::JS8CallTurbo, JS8C_TX_SECONDS); qint32 framesNeededC = computeFramesNeededForDecode(Varicode::JS8CallTurbo, JS8C_TX_SECONDS);
bool couldDecodeC = k >= cycleSampleStartC + framesNeededC; bool couldDecodeC = k >= cycleSampleStartC + framesNeededC;
#if JS8_ENABLE_JS8D #if JS8_ENABLE_JS8E
qint32 cycleSampleStartD = computeCycleStartForDecode(computeCurrentCycle(JS8D_TX_SECONDS), JS8D_TX_SECONDS); qint32 cycleSampleStartE = computeCycleStartForDecode(computeCurrentCycle(JS8E_TX_SECONDS), JS8E_TX_SECONDS);
qint32 framesNeededD = computeFramesNeededForDecode(Varicode::JS8CallUltra, JS8D_TX_SECONDS); qint32 framesNeededE = computeFramesNeededForDecode(Varicode::JS8CallUltraSlow, JS8E_TX_SECONDS);
bool couldDecodeD = k >= cycleSampleStartD + framesNeededD; bool couldDecodeE = k >= cycleSampleStartE + framesNeededE;
#else #else
qint32 cycleSampleStartD = 0; qint32 cycleSampleStartE = 0;
qint32 framesNeededD = 0; qint32 framesNeededE = 0;
bool couldDecodeD = false; bool couldDecodeE = false;
#endif #endif
if(m_diskData){ if(m_diskData){
dec_data.params.kposA = 0; dec_data.params.kposA = 0;
dec_data.params.kposB = 0; dec_data.params.kposB = 0;
dec_data.params.kposC = 0; dec_data.params.kposC = 0;
dec_data.params.kposD = 0; dec_data.params.kposE = 0;
dec_data.params.kszA = NTMAX*RX_SAMPLE_RATE-1; dec_data.params.kszA = NTMAX*RX_SAMPLE_RATE-1;
dec_data.params.kszB = NTMAX*RX_SAMPLE_RATE-1; dec_data.params.kszB = NTMAX*RX_SAMPLE_RATE-1;
dec_data.params.kszC = NTMAX*RX_SAMPLE_RATE-1; dec_data.params.kszC = NTMAX*RX_SAMPLE_RATE-1;
dec_data.params.kszD = NTMAX*RX_SAMPLE_RATE-1; dec_data.params.kszE = NTMAX*RX_SAMPLE_RATE-1;
dec_data.params.nsubmodes = 0; dec_data.params.nsubmodes = 0;
couldDecodeA = true; couldDecodeA = true;
couldDecodeB = true; couldDecodeB = true;
couldDecodeC = true; couldDecodeC = true;
#if JS8_ENABLE_JS8D #if JS8_ENABLE_JS8E
couldDecodeD = true; couldDecodeE = true;
#endif #endif
} else { } else {
// set the params for starting positions and sizes for decode // set the params for starting positions and sizes for decode
dec_data.params.kposA = cycleSampleStartA; dec_data.params.kposA = cycleSampleStartA;
dec_data.params.kposB = cycleSampleStartB; dec_data.params.kposB = cycleSampleStartB;
dec_data.params.kposC = cycleSampleStartC; dec_data.params.kposC = cycleSampleStartC;
dec_data.params.kposD = cycleSampleStartD; dec_data.params.kposE = cycleSampleStartE;
dec_data.params.kszA = qMax(framesNeededA, k-cycleSampleStartA); dec_data.params.kszA = qMax(framesNeededA, k-cycleSampleStartA);
dec_data.params.kszB = qMax(framesNeededB, k-cycleSampleStartB); dec_data.params.kszB = qMax(framesNeededB, k-cycleSampleStartB);
dec_data.params.kszC = qMax(framesNeededC, k-cycleSampleStartC); dec_data.params.kszC = qMax(framesNeededC, k-cycleSampleStartC);
dec_data.params.kszD = qMax(framesNeededD, k-cycleSampleStartD); dec_data.params.kszE = qMax(framesNeededE, k-cycleSampleStartE);
dec_data.params.nsubmodes = 0; dec_data.params.nsubmodes = 0;
} }
bool multi = ui->actionModeMultiDecoder->isChecked(); bool multi = ui->actionModeMultiDecoder->isChecked();
int decodes = 0; int decodes = 0;
if(couldDecodeD && (multi || submode == Varicode::JS8CallUltra)){ if(couldDecodeE && (multi || submode == Varicode::JS8CallUltraSlow)){
qDebug() << "could decode D from" << cycleSampleStartD << "to" << cycleSampleStartD + framesNeededD; qDebug() << "could decode E from" << cycleSampleStartE << "to" << cycleSampleStartE + framesNeededE;
submode = Varicode::JS8CallUltra; submode = Varicode::JS8CallUltraSlow;
period = JS8D_TX_SECONDS; period = JS8E_TX_SECONDS;
dec_data.params.nsubmodes |= (Varicode::JS8CallUltra << 1); dec_data.params.nsubmodes |= (Varicode::JS8CallUltraSlow << 1);
decodes++; decodes++;
} }
if(couldDecodeC && (multi || submode == Varicode::JS8CallTurbo)){ if(couldDecodeC && (multi || submode == Varicode::JS8CallTurbo)){
@ -4212,8 +4227,8 @@ bool MainWindow::decodeReady(int submode, int period, int *pSubmode, int *pPerio
frames = dec_data.params.kszC; frames = dec_data.params.kszC;
} }
else if(m_nSubMode == Varicode::JS8CallUltra){ else if(m_nSubMode == Varicode::JS8CallUltra){
start = dec_data.params.kposD; start = dec_data.params.kposE;
frames = dec_data.params.kszD; frames = dec_data.params.kszE;
} }
memcpy(dec_data.d1, dec_data.d2 + start, sizeof(dec_data.d2[0]) * frames); memcpy(dec_data.d1, dec_data.d2 + start, sizeof(dec_data.d2[0]) * frames);
#endif #endif
@ -5056,8 +5071,8 @@ void MainWindow::guiUpdate()
txDuration=JS8B_START_DELAY_MS/1000.0 + JS8_NUM_SYMBOLS * (double)JS8B_SYMBOL_SAMPLES/(double)RX_SAMPLE_RATE; txDuration=JS8B_START_DELAY_MS/1000.0 + JS8_NUM_SYMBOLS * (double)JS8B_SYMBOL_SAMPLES/(double)RX_SAMPLE_RATE;
} else if(m_nSubMode == Varicode::JS8CallTurbo){ } else if(m_nSubMode == Varicode::JS8CallTurbo){
txDuration=JS8C_START_DELAY_MS/1000.0 + JS8_NUM_SYMBOLS * (double)JS8C_SYMBOL_SAMPLES/(double)RX_SAMPLE_RATE; txDuration=JS8C_START_DELAY_MS/1000.0 + JS8_NUM_SYMBOLS * (double)JS8C_SYMBOL_SAMPLES/(double)RX_SAMPLE_RATE;
} else if(m_nSubMode == Varicode::JS8CallUltra){ } else if(m_nSubMode == Varicode::JS8CallUltraSlow){
txDuration=JS8D_START_DELAY_MS/1000.0 + JS8_NUM_SYMBOLS * (double)JS8D_SYMBOL_SAMPLES/(double)RX_SAMPLE_RATE; txDuration=JS8E_START_DELAY_MS/1000.0 + JS8_NUM_SYMBOLS * (double)JS8E_SYMBOL_SAMPLES/(double)RX_SAMPLE_RATE;
} }
} }
@ -5143,8 +5158,8 @@ void MainWindow::guiUpdate()
else if(m_nSubMode == Varicode::JS8CallTurbo){ else if(m_nSubMode == Varicode::JS8CallTurbo){
ratio = (((double)m_TRperiod - (JS8_NUM_SYMBOLS*(double)JS8C_SYMBOL_SAMPLES/(double)RX_SAMPLE_RATE))/(double)m_TRperiod); ratio = (((double)m_TRperiod - (JS8_NUM_SYMBOLS*(double)JS8C_SYMBOL_SAMPLES/(double)RX_SAMPLE_RATE))/(double)m_TRperiod);
} }
else if(m_nSubMode == Varicode::JS8CallUltra){ else if(m_nSubMode == Varicode::JS8CallUltraSlow){
ratio = (((double)m_TRperiod - (JS8_NUM_SYMBOLS*(double)JS8D_SYMBOL_SAMPLES/(double)RX_SAMPLE_RATE))/(double)m_TRperiod); ratio = (((double)m_TRperiod - (JS8_NUM_SYMBOLS*(double)JS8E_SYMBOL_SAMPLES/(double)RX_SAMPLE_RATE))/(double)m_TRperiod);
} }
if(fTR > 1.0-ratio && fTR < 1.0){ if(fTR > 1.0-ratio && fTR < 1.0){
@ -5231,7 +5246,7 @@ void MainWindow::guiUpdate()
qDebug() << "gen ft8"; qDebug() << "gen ft8";
genft8_(message, MyGrid, &bcontest, &m_i3bit, msgsent, const_cast<char *> (ft8msgbits), genft8_(message, MyGrid, &bcontest, &m_i3bit, msgsent, const_cast<char *> (ft8msgbits),
const_cast<int *> (itone), 22, 6, 22); const_cast<int *> (itone), 22, 6, 22);
} else if (m_nSubMode == Varicode::JS8CallFast || m_nSubMode == Varicode::JS8CallTurbo || m_nSubMode == Varicode::JS8CallUltra){ } else if (m_nSubMode == Varicode::JS8CallFast || m_nSubMode == Varicode::JS8CallTurbo || m_nSubMode == Varicode::JS8CallUltraSlow){
qDebug() << "gen js8"; qDebug() << "gen js8";
genjs8_(message, MyGrid, &bcontest, &m_i3bit, msgsent, const_cast<char *> (ft8msgbits), genjs8_(message, MyGrid, &bcontest, &m_i3bit, msgsent, const_cast<char *> (ft8msgbits),
const_cast<int *> (itone), 22, 6, 22); const_cast<int *> (itone), 22, 6, 22);
@ -7173,7 +7188,7 @@ void MainWindow::on_actionModeJS8Turbo_triggered(){
on_actionJS8_triggered(); on_actionJS8_triggered();
} }
void MainWindow::on_actionModeJS8Ultra_triggered(){ void MainWindow::on_actionModeJS8UltraSlow_triggered(){
on_actionJS8_triggered(); on_actionJS8_triggered();
} }
@ -7235,8 +7250,8 @@ void MainWindow::on_actionJS8_triggered()
else if(ui->actionModeJS8Turbo->isChecked()){ else if(ui->actionModeJS8Turbo->isChecked()){
m_nSubMode=Varicode::JS8CallTurbo; m_nSubMode=Varicode::JS8CallTurbo;
} }
else if(ui->actionModeJS8Ultra->isChecked()){ else if(ui->actionModeJS8UltraSlow->isChecked()){
m_nSubMode=Varicode::JS8CallUltra; m_nSubMode=Varicode::JS8CallUltraSlow;
} }
// Only enable heartbeat for normal mode // Only enable heartbeat for normal mode
@ -7272,7 +7287,12 @@ void MainWindow::on_actionJS8_triggered()
#if JS8_RING_BUFFER #if JS8_RING_BUFFER
Q_ASSERT(NTMAX == 60); Q_ASSERT(NTMAX == 60);
m_wideGraph->setPeriod(m_TRperiod, m_nsps); m_wideGraph->setPeriod(m_TRperiod, m_nsps);
#if JS8_ENABLE_JS8E && !JS8E_IS_ULTRA
m_detector->setTRPeriod(NTMAX); // TODO - not thread safe
#else
m_detector->setTRPeriod(NTMAX / 2); // TODO - not thread safe m_detector->setTRPeriod(NTMAX / 2); // TODO - not thread safe
#endif
#else #else
m_wideGraph->setPeriod(m_TRperiod, m_nsps); m_wideGraph->setPeriod(m_TRperiod, m_nsps);
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
@ -9313,9 +9333,9 @@ void MainWindow::transmit (double snr)
symbolSamples=(double)JS8C_SYMBOL_SAMPLES; symbolSamples=(double)JS8C_SYMBOL_SAMPLES;
toneSpacing=(double)RX_SAMPLE_RATE/(double)JS8C_SYMBOL_SAMPLES; toneSpacing=(double)RX_SAMPLE_RATE/(double)JS8C_SYMBOL_SAMPLES;
} }
else if(m_nSubMode == Varicode::JS8CallUltra){ else if(m_nSubMode == Varicode::JS8CallUltraSlow){
symbolSamples=(double)JS8D_SYMBOL_SAMPLES; symbolSamples=(double)JS8E_SYMBOL_SAMPLES;
toneSpacing=(double)RX_SAMPLE_RATE/(double)JS8D_SYMBOL_SAMPLES; toneSpacing=(double)RX_SAMPLE_RATE/(double)JS8E_SYMBOL_SAMPLES;
} }
if(m_config.x2ToneSpacing()) toneSpacing*=2.0; if(m_config.x2ToneSpacing()) toneSpacing*=2.0;
if(m_config.x4ToneSpacing()) toneSpacing*=4.0; if(m_config.x4ToneSpacing()) toneSpacing*=4.0;
@ -9583,6 +9603,9 @@ int MainWindow::rxThreshold(){
int threshold = 10; int threshold = 10;
if(m_nSubMode == Varicode::JS8CallFast){ threshold = 16; } if(m_nSubMode == Varicode::JS8CallFast){ threshold = 16; }
if(m_nSubMode == Varicode::JS8CallTurbo){ threshold = 32; } if(m_nSubMode == Varicode::JS8CallTurbo){ threshold = 32; }
#if JS8E_IS_ULTRA
if(m_nSubMode == Varicode::JS8CallUltraSlow){ threshold = 50; }
#endif
return threshold; return threshold;
} }
@ -12350,8 +12373,8 @@ void MainWindow::networkMessage(Message const &message)
if(speed == Varicode::JS8CallTurbo){ if(speed == Varicode::JS8CallTurbo){
ui->actionModeJS8Turbo->setChecked(true); ui->actionModeJS8Turbo->setChecked(true);
} }
if(speed == Varicode::JS8CallUltra){ if(speed == Varicode::JS8CallUltraSlow){
ui->actionModeJS8Ultra->setChecked(true); ui->actionModeJS8UltraSlow->setChecked(true);
} }
} }
sendNetworkMessage("MODE.SPEED", "", { sendNetworkMessage("MODE.SPEED", "", {

View File

@ -269,7 +269,7 @@ private slots:
void on_actionModeJS8Normal_triggered(); void on_actionModeJS8Normal_triggered();
void on_actionModeJS8Fast_triggered(); void on_actionModeJS8Fast_triggered();
void on_actionModeJS8Turbo_triggered(); void on_actionModeJS8Turbo_triggered();
void on_actionModeJS8Ultra_triggered(); void on_actionModeJS8UltraSlow_triggered();
void on_actionHeartbeatAcknowledgements_toggled(bool checked); void on_actionHeartbeatAcknowledgements_toggled(bool checked);
void on_actionModeMultiDecoder_toggled(bool checked); void on_actionModeMultiDecoder_toggled(bool checked);
void on_actionModeAutoreply_toggled(bool checked); void on_actionModeAutoreply_toggled(bool checked);

View File

@ -4791,7 +4791,7 @@ list. The list can be maintained in Settings (F2).</string>
<addaction name="actionModeJS8Normal"/> <addaction name="actionModeJS8Normal"/>
<addaction name="actionModeJS8Fast"/> <addaction name="actionModeJS8Fast"/>
<addaction name="actionModeJS8Turbo"/> <addaction name="actionModeJS8Turbo"/>
<addaction name="actionModeJS8Ultra"/> <addaction name="actionModeJS8UltraSlow"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="menu_Decode_Passes"/> <addaction name="menu_Decode_Passes"/>
<addaction name="actionModeMultiDecoder"/> <addaction name="actionModeMultiDecoder"/>
@ -5722,7 +5722,7 @@ list. The list can be maintained in Settings (F2).</string>
<string>JS8 (&amp;Turbo, 6s, 160Hz, ~40 WPM)</string> <string>JS8 (&amp;Turbo, 6s, 160Hz, ~40 WPM)</string>
</property> </property>
</action> </action>
<action name="actionModeJS8Ultra"> <action name="actionModeJS8UltraSlow">
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>

View File

@ -422,8 +422,8 @@ void CPlotter::DrawOverlay() //DrawOverlay()
else if(m_nSubMode == Varicode::JS8CallTurbo){ else if(m_nSubMode == Varicode::JS8CallTurbo){
bw = 8.0*(double)RX_SAMPLE_RATE/(double)JS8C_SYMBOL_SAMPLES; bw = 8.0*(double)RX_SAMPLE_RATE/(double)JS8C_SYMBOL_SAMPLES;
} }
else if(m_nSubMode == Varicode::JS8CallUltra){ else if(m_nSubMode == Varicode::JS8CallUltraSlow){
bw = 8.0*(double)RX_SAMPLE_RATE/(double)JS8D_SYMBOL_SAMPLES; bw = 8.0*(double)RX_SAMPLE_RATE/(double)JS8E_SYMBOL_SAMPLES;
} }
painter0.setPen(penGreen); painter0.setPen(penGreen);

View File

@ -28,7 +28,8 @@ public:
JS8CallNormal = 0, JS8CallNormal = 0,
JS8CallFast = 1, JS8CallFast = 1,
JS8CallTurbo = 2, JS8CallTurbo = 2,
JS8CallUltra = 4 JS8CallSlow = 4,
JS8CallUltraSlow = 4
}; };
// frame type transmitted via itype and decoded by the ft8 decoded // frame type transmitted via itype and decoded by the ft8 decoded