mirror of https://github.com/saitohirga/WSJT-X.git
Better handling of fSpread in mainwindow.cpp. Makes auto-seq work when plotspec is used.
This commit is contained in:
parent
7fa7b0dda9
commit
159b8a97f7
|
@ -719,6 +719,7 @@ contains
|
||||||
|
|
||||||
character*2 annot
|
character*2 annot
|
||||||
character*37 decoded0
|
character*37 decoded0
|
||||||
|
character*70 line
|
||||||
|
|
||||||
decoded0=decoded
|
decoded0=decoded
|
||||||
annot=' '
|
annot=' '
|
||||||
|
@ -728,22 +729,25 @@ contains
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if(ntrperiod.lt.60) then
|
if(ntrperiod.lt.60) then
|
||||||
write(*,1001) nutc,nsnr,dt,nint(freq),decoded0,annot
|
write(line,1001) nutc,nsnr,dt,nint(freq),decoded0,annot
|
||||||
1001 format(i6.6,i4,f5.1,i5,' ` ',1x,a37,1x,a2)
|
1001 format(i6.6,i4,f5.1,i5,' ` ',1x,a37,1x,a2)
|
||||||
write(13,1002) nutc,nint(sync),nsnr,dt,freq,0,decoded0
|
write(13,1002) nutc,nint(sync),nsnr,dt,freq,0,decoded0
|
||||||
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FST240')
|
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FST240')
|
||||||
else
|
else
|
||||||
if(fmid.ne.-999.0) then
|
write(line,1003) nutc,nsnr,dt,nint(freq),decoded0,annot
|
||||||
if(w50.lt.0.95) write(decoded0(18:22),'(f5.3)') w50
|
|
||||||
if(w50.ge.0.95) write(decoded0(18:22),'(f5.2)') w50
|
|
||||||
if(decoded0(18:18).eq.'0') decoded0(18:18)=' '
|
|
||||||
endif
|
|
||||||
write(*,1003) nutc,nsnr,dt,nint(freq),decoded0,annot
|
|
||||||
1003 format(i4.4,i4,f5.1,i5,' ` ',1x,a37,1x,a2,2f7.3)
|
1003 format(i4.4,i4,f5.1,i5,' ` ',1x,a37,1x,a2,2f7.3)
|
||||||
write(13,1004) nutc,nint(sync),nsnr,dt,freq,0,decoded0
|
write(13,1004) nutc,nint(sync),nsnr,dt,freq,0,decoded0
|
||||||
1004 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a37,' FST240')
|
1004 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a37,' FST240')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if(fmid.ne.-999.0) then
|
||||||
|
if(w50.lt.0.95) write(line(65:70),'(f6.3)') w50
|
||||||
|
if(w50.ge.0.95) write(line(65:70),'(f6.2)') w50
|
||||||
|
endif
|
||||||
|
|
||||||
|
write(*,1005) line
|
||||||
|
1005 format(a70)
|
||||||
|
|
||||||
call flush(6)
|
call flush(6)
|
||||||
call flush(13)
|
call flush(13)
|
||||||
|
|
||||||
|
|
|
@ -1575,7 +1575,6 @@ QString MainWindow::save_wave_file (QString const& name, short const * data, int
|
||||||
QString const& my_callsign, QString const& my_grid, QString const& mode, qint32 sub_mode,
|
QString const& my_callsign, QString const& my_grid, QString const& mode, qint32 sub_mode,
|
||||||
Frequency frequency, QString const& his_call, QString const& his_grid) const
|
Frequency frequency, QString const& his_call, QString const& his_grid) const
|
||||||
{
|
{
|
||||||
qDebug() << "aa" << QDateTime::currentDateTimeUtc().toString("hh:mm:ss.zzz");
|
|
||||||
//
|
//
|
||||||
// This member function runs in a thread and should not access
|
// This member function runs in a thread and should not access
|
||||||
// members that may be changed in the GUI thread or any other thread
|
// members that may be changed in the GUI thread or any other thread
|
||||||
|
@ -1612,7 +1611,6 @@ QString MainWindow::save_wave_file (QString const& name, short const * data, int
|
||||||
{
|
{
|
||||||
return file_name + ": " + wav.errorString ();
|
return file_name + ": " + wav.errorString ();
|
||||||
}
|
}
|
||||||
qDebug() << "bb" << QDateTime::currentDateTimeUtc().toString("hh:mm:ss.zzz");
|
|
||||||
return QString {};
|
return QString {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3147,6 +3145,8 @@ void MainWindow::readFromStdout() //readFromStdout
|
||||||
{
|
{
|
||||||
while(proc_jt9.canReadLine()) {
|
while(proc_jt9.canReadLine()) {
|
||||||
auto line_read = proc_jt9.readLine ();
|
auto line_read = proc_jt9.readLine ();
|
||||||
|
m_fSpread=line_read.mid(64,6).toFloat();
|
||||||
|
line_read=line_read.left(64);
|
||||||
if (auto p = std::strpbrk (line_read.constData (), "\n\r")) {
|
if (auto p = std::strpbrk (line_read.constData (), "\n\r")) {
|
||||||
// truncate before line ending chars
|
// truncate before line ending chars
|
||||||
line_read = line_read.left (p - line_read.constData ());
|
line_read = line_read.left (p - line_read.constData ());
|
||||||
|
@ -3231,7 +3231,18 @@ void MainWindow::readFromStdout() //readFromStdout
|
||||||
m_bDisplayedOnce=true;
|
m_bDisplayedOnce=true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ui->decodedTextBrowser->displayDecodedText(decodedtext0,m_baseCall,m_mode,m_config.DXCC(),
|
DecodedText decodedtext1=decodedtext0;
|
||||||
|
if(m_mode.startsWith("FST240") and m_fSpread>0.0) {
|
||||||
|
QString t=decodedtext0.string();
|
||||||
|
QString t2;
|
||||||
|
if(m_fSpread<0.95) t2.sprintf("%5.3f",m_fSpread);
|
||||||
|
if(m_fSpread>=0.95) t2.sprintf("%5.2f",m_fSpread);
|
||||||
|
t=t.left(46)+t2+t.mid(50);
|
||||||
|
t=t.trimmed();
|
||||||
|
DecodedText dt2{t};
|
||||||
|
decodedtext1=dt2;
|
||||||
|
}
|
||||||
|
ui->decodedTextBrowser->displayDecodedText(decodedtext1,m_baseCall,m_mode,m_config.DXCC(),
|
||||||
m_logBook,m_currentBand,m_config.ppfx(),
|
m_logBook,m_currentBand,m_config.ppfx(),
|
||||||
(ui->cbCQonly->isVisible() and ui->cbCQonly->isChecked()));
|
(ui->cbCQonly->isVisible() and ui->cbCQonly->isChecked()));
|
||||||
|
|
||||||
|
@ -3476,7 +3487,6 @@ void MainWindow::pskPost (DecodedText const& decodedtext)
|
||||||
int snr = decodedtext.snr();
|
int snr = decodedtext.snr();
|
||||||
Frequency frequency = m_freqNominal + audioFrequency;
|
Frequency frequency = m_freqNominal + audioFrequency;
|
||||||
pskSetLocal ();
|
pskSetLocal ();
|
||||||
// qDebug() << "bb" << deCall << grid << frequency << msgmode << snr;
|
|
||||||
if(grid.contains (grid_regexp)) {
|
if(grid.contains (grid_regexp)) {
|
||||||
// qDebug() << "To PSKreporter:" << deCall << grid << frequency << msgmode << snr;
|
// qDebug() << "To PSKreporter:" << deCall << grid << frequency << msgmode << snr;
|
||||||
psk_Reporter->addRemoteStation(deCall,grid,QString::number(frequency),msgmode,
|
psk_Reporter->addRemoteStation(deCall,grid,QString::number(frequency),msgmode,
|
||||||
|
@ -4529,7 +4539,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
|
||||||
|| ("JT9" == m_mode && mode != "@")
|
|| ("JT9" == m_mode && mode != "@")
|
||||||
|| ("MSK144" == m_mode && !("&" == mode || "^" == mode))
|
|| ("MSK144" == m_mode && !("&" == mode || "^" == mode))
|
||||||
|| ("QRA64" == m_mode && mode.left (1) != ":")) {
|
|| ("QRA64" == m_mode && mode.left (1) != ":")) {
|
||||||
return; //Currently we do auto-sequencing only in FT4, FT8, and MSK144
|
return; //Currently we do auto-sequencing only in FT4, FT8, MSK144, and FST240
|
||||||
}
|
}
|
||||||
|
|
||||||
//Skip the rest if no decoded text extracted
|
//Skip the rest if no decoded text extracted
|
||||||
|
@ -4570,6 +4580,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
|
||||||
QString hiscall;
|
QString hiscall;
|
||||||
QString hisgrid;
|
QString hisgrid;
|
||||||
message.deCallAndGrid(/*out*/hiscall,hisgrid);
|
message.deCallAndGrid(/*out*/hiscall,hisgrid);
|
||||||
|
|
||||||
if(message.string().contains(hiscall+"/R")) {
|
if(message.string().contains(hiscall+"/R")) {
|
||||||
hiscall+="/R";
|
hiscall+="/R";
|
||||||
ui->dxCallEntry->setText(hiscall);
|
ui->dxCallEntry->setText(hiscall);
|
||||||
|
|
|
@ -419,6 +419,7 @@ private:
|
||||||
float m_t0Pick;
|
float m_t0Pick;
|
||||||
float m_t1Pick;
|
float m_t1Pick;
|
||||||
float m_fCPUmskrtd;
|
float m_fCPUmskrtd;
|
||||||
|
float m_fSpread;
|
||||||
|
|
||||||
qint32 m_waterfallAvg;
|
qint32 m_waterfallAvg;
|
||||||
qint32 m_ntx;
|
qint32 m_ntx;
|
||||||
|
@ -716,7 +717,7 @@ private:
|
||||||
void pskPost(DecodedText const& decodedtext);
|
void pskPost(DecodedText const& decodedtext);
|
||||||
void displayDialFrequency ();
|
void displayDialFrequency ();
|
||||||
void transmitDisplay (bool);
|
void transmitDisplay (bool);
|
||||||
void processMessage(DecodedText const&, Qt::KeyboardModifiers = Qt::NoModifier);
|
void processMessage(DecodedText const& message, Qt::KeyboardModifiers = Qt::NoModifier);
|
||||||
void replyToCQ (QTime, qint32 snr, float delta_time, quint32 delta_frequency, QString const& mode, QString const& message_text, bool low_confidence, quint8 modifiers);
|
void replyToCQ (QTime, qint32 snr, float delta_time, quint32 delta_frequency, QString const& mode, QString const& message_text, bool low_confidence, quint8 modifiers);
|
||||||
void locationChange(QString const& location);
|
void locationChange(QString const& location);
|
||||||
void replayDecodes ();
|
void replayDecodes ();
|
||||||
|
|
Loading…
Reference in New Issue