diff --git a/displaytext.cpp b/displaytext.cpp
index eaa42c8fd..4ada4f461 100644
--- a/displaytext.cpp
+++ b/displaytext.cpp
@@ -52,10 +52,9 @@ void DisplayText::insertLineSpacer(QString const& line)
void DisplayText::appendText(QString const& text, QString const& bg)
{
- QString t=text.trimmed().replace('<','(');
- t=t.replace('>',')');
+ QString escaped {text.trimmed().replace('<',"<").replace('>',">").replace(' ', " ")};
QString s = "
" + t.trimmed ().replace (' ', " ") + " |
";
+ bg + "\">" + escaped + "";
auto cursor = textCursor ();
cursor.movePosition (QTextCursor::End);
auto pos = cursor.position ();
diff --git a/lib/JTMSKsim.f90 b/lib/JTMSKsim.f90
index 23e430d0f..aa19224d5 100644
--- a/lib/JTMSKsim.f90
+++ b/lib/JTMSKsim.f90
@@ -19,8 +19,8 @@ program JTMSKsim
if(nargs.ne.5) then
print*,'Usage: JTMSKsim message freq width snr nfiles'
print*,' '
- print*,'Examples: JTMSKsim "K1ABC W9XYZ EN37" 1500 0.05 0.0 1'
- print*,' JTMSKsim " R26" 1500 0.01 0.0 10'
+ print*,'Examples: JTMSKsim "K1ABC W9XYZ EN37" 1500 0.12 2 1'
+ print*,' JTMSKsim " R26" 1500 0.01 1 3'
go to 999
endif
call getarg(1,msg)
@@ -86,7 +86,7 @@ program JTMSKsim
write(10) h,iwave !Save the .wav file
close(10)
- call jtmsk_short(cwave,NMAX,msg)
+! call jtmsk_short(cwave,NMAX,msg)
enddo
diff --git a/lib/jtmsk_decode.f90 b/lib/jtmsk_decode.f90
index 0a64e15e4..85e20ec5a 100644
--- a/lib/jtmsk_decode.f90
+++ b/lib/jtmsk_decode.f90
@@ -109,7 +109,7 @@ subroutine jtmsk_decode(id2,narg,line)
if(msg.ne.' ') then
nline=nline+1
j=nint(12000.0*tbest/512.0)
- nsnr=nint(yellow(j)-1.0)
+ nsnr=nint(3*(yellow(j)-2.0))
write(line(nline),1020) nutc,nsnr,tbest,nrxfreq,msg
endif
!###
diff --git a/mainwindow.cpp b/mainwindow.cpp
index e9909b9f1..2569f7384 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -97,6 +97,7 @@ extern "C" {
float* width);
void fast_decode_(short id2[], int narg[], char msg[], int len);
+ void hash_calls_(char calls[], int* ih9, int len);
void degrade_snr_(short d2[], int* n, float* db);
void wav12_(short d2[], short d1[], int* nbytes, short* nbitsam2);
}
@@ -115,6 +116,7 @@ float fast_s[44992]; //44992=64*703
float fast_s2[44992];
int fast_jh;
int fast_jh2;
+int narg[14];
QVector g_ColorTbl;
namespace
@@ -781,6 +783,7 @@ void MainWindow::readSettings()
ui->sbSubmode->setValue(m_nSubMode);
m_FtolIndex=m_settings->value("FtolIndex",21).toInt();
ui->sbFtol->setValue(m_FtolIndex);
+ on_sbFtol_valueChanged(m_FtolIndex);
// ui->FTol_combo_box->setCurrentText(m_settings->value("FTol","500").toString ());
ui->syncSpinBox->setValue(m_settings->value("MinSync",0).toInt());
m_bEME=m_settings->value("EME",false).toBool();
@@ -1859,7 +1862,6 @@ void MainWindow::decode() //decode()
t1=m_t1Pick;
if(t1 > m_kdone/12000.0) t1=m_kdone/12000.0;
}
- static int narg[12];
static short int d2b[360000];
narg[0]=dec_data.params.nutc;
if(m_kdone>12000*m_TRperiod) {
@@ -1879,6 +1881,9 @@ void MainWindow::decode() //decode()
if(m_mode=="JTMSK") narg[9]=103; //JTMSK
narg[10]=ui->RxFreqSpinBox->value();
narg[11]=m_Ftol;
+ m_calls="<" + m_config.my_callsign() + " " + hisCall + ">";
+ hash_calls_(m_calls.toLatin1().data(), &narg[12], m_calls.length());
+ narg[13]=-1;
memcpy(d2b,dec_data.d2,2*360000);
*future3 = QtConcurrent::run(fast_decode_,&d2b[0],&narg[0],&m_msg[0][0],80);
watcher3->setFuture(*future3);
@@ -1903,6 +1908,7 @@ void::MainWindow::fast_decode_done()
}
if(m_msg[i][0]==0) break;
QString message=QString::fromLatin1(m_msg[i]);
+ if(narg[13]==narg[12]) message=message.trimmed().replace("<...>",m_calls);
//Left (Band activity) window
DecodedText decodedtext;
@@ -4340,7 +4346,7 @@ void MainWindow::transmit (double snr)
m_toneSpacing=6000.0/m_nsps;
double f0=1000.0;
int nsym=NUM_JTMSK_SYMBOLS;
- if(itone[37] < 0) nsym=37;
+ if(itone[35] < 0) nsym=35;
Q_EMIT sendMessage (nsym, double(m_nsps), f0, m_toneSpacing,
m_soundOutput, m_config.audio_output_channel (),
true, true, snr, m_TRperiod);
diff --git a/mainwindow.h b/mainwindow.h
index 838a97701..bbdc3369b 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -483,6 +483,7 @@ private:
QString m_fileToSave;
QString m_band;
QString m_c2name;
+ QString m_calls;
QStringList m_prefix;
QStringList m_suffix;