diff --git a/commons.h b/commons.h index 4083bb22f..b095ec957 100644 --- a/commons.h +++ b/commons.h @@ -65,6 +65,7 @@ extern struct dec_data { char mygrid[6]; char hiscall[12]; char hisgrid[6]; + char cqstr[4]; } params; } dec_data; diff --git a/lib/decoder.f90 b/lib/decoder.f90 index 042cf906d..0d6a16061 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -40,6 +40,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample) character(len=20) :: datetime character(len=12) :: mycall, hiscall character(len=6) :: mygrid, hisgrid + character(len=4) :: cqstr save type(counting_jt4_decoder) :: my_jt4 type(counting_jt65_decoder) :: my_jt65 @@ -53,6 +54,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample) hiscall=transfer(params%hiscall,hiscall) mygrid=transfer(params%mygrid,mygrid) hisgrid=transfer(params%hisgrid,hisgrid) + cqstr=transfer(params%cqstr,cqstr) ! initialize decode counts my_jt4%decoded = 0 @@ -153,7 +155,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample) call timer('decft4 ',0) call my_ft4%decode(ft4_decoded,id2,params%nQSOProgress,params%nfqso, & params%nutc,params%nfa,params%nfb,params%ndepth, & - logical(params%lapcqonly),ncontest,mycall,hiscall) + logical(params%lapcqonly),ncontest,cqstr,mycall,hiscall) call timer('decft4 ',1) go to 800 endif diff --git a/lib/ft4_decode.f90 b/lib/ft4_decode.f90 index 3e8ed3134..5913931ea 100644 --- a/lib/ft4_decode.f90 +++ b/lib/ft4_decode.f90 @@ -24,7 +24,7 @@ module ft4_decode contains subroutine decode(this,callback,iwave,nQSOProgress,nfqso, & - nutc,nfa,nfb,ndepth,lapcqonly,ncontest,mycall,hiscall) + nutc,nfa,nfb,ndepth,lapcqonly,ncontest,cqstr,mycall,hiscall) use timer_module, only: timer use packjt77 include 'ft4/ft4_params.f90' diff --git a/lib/jt9com.f90 b/lib/jt9com.f90 index c595582d6..46829f09c 100644 --- a/lib/jt9com.f90 +++ b/lib/jt9com.f90 @@ -46,6 +46,7 @@ character(kind=c_char) :: mygrid(6) character(kind=c_char) :: hiscall(12) character(kind=c_char) :: hisgrid(6) + character(kind=c_char) :: cqstr(4) end type params_block type, bind(C) :: dec_data diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index b3c81046f..f1d240723 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -331,6 +331,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, tx_status_label {"Receiving"}, wsprNet {new WSPRNet {&m_network_manager, this}}, m_appDir {QApplication::applicationDirPath ()}, + m_cqStr {""}, m_palette {"Linrad"}, m_mode {"JT9"}, m_rpt {"-15"}, @@ -2932,6 +2933,7 @@ void MainWindow::decode() //decode() QString hisGrid {ui->dxGridEntry->text ()}; memcpy(dec_data.params.hiscall,(hisCall + " ").toLatin1 ().constData (), sizeof dec_data.params.hiscall); memcpy(dec_data.params.hisgrid,(hisGrid + " ").toLatin1 ().constData (), sizeof dec_data.params.hisgrid); + memcpy(dec_data.params.cqstr,(m_cqStr + " ").toLatin1 ().constData (), sizeof dec_data.params.cqstr); //newdat=1 ==> this is new data, must do the big FFT //nagain=1 ==> decode only at fQSO +/- Tol @@ -4929,16 +4931,23 @@ void MainWindow::genCQMsg () } QString t=ui->tx6->text(); + QStringList tlist=t.split(" "); if((m_mode=="FT4" or m_mode=="FT8" or m_mode=="MSK144") and SpecOp::NONE != m_config.special_op_id() and - t.split(" ").at(1)==m_config.my_callsign() and + ( tlist.at(1)==m_config.my_callsign() or + tlist.at(2)==m_config.my_callsign() ) and stdCall(m_config.my_callsign())) { - if(SpecOp::NA_VHF == m_config.special_op_id()) t="CQ TEST" + t.mid(2,-1); - if(SpecOp::EU_VHF == m_config.special_op_id()) t="CQ TEST" + t.mid(2,-1); - if(SpecOp::FIELD_DAY == m_config.special_op_id()) t="CQ FD" + t.mid(2,-1); + if(SpecOp::NA_VHF == m_config.special_op_id()) m_cqStr="TEST"; + if(SpecOp::EU_VHF == m_config.special_op_id()) m_cqStr="TEST"; + if(SpecOp::FIELD_DAY == m_config.special_op_id()) m_cqStr="FD"; if(SpecOp::RTTY == m_config.special_op_id()) { - if(m_config.RTTY_Exchange()!="SCC") t="CQ RU" + t.mid(2,-1); - if(m_config.RTTY_Exchange()=="SCC") t="CQ SCC" + t.mid(2,-1); + if(m_config.RTTY_Exchange()!="SCC") m_cqStr="RU"; + if(m_config.RTTY_Exchange()=="SCC") m_cqStr="SCC"; + } + if( tlist.at(1)==m_config.my_callsign() ) { + t="CQ " + m_cqStr + " " + tlist.at(1) + " " + tlist.at(2); + } else { + t="CQ " + m_cqStr + " " + tlist.at(2) + " " + tlist.at(3); } ui->tx6->setText(t); } diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 7718a24d5..91575b079 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -589,6 +589,7 @@ private: QString m_hisCall; QString m_hisGrid; QString m_appDir; + QString m_cqStr; QString m_palette; QString m_dateTime; QString m_mode;