mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 21:58:38 -05:00
Changes to GUI to accommodate QRA66. It's basically functional, I think.
This commit is contained in:
parent
a0b5be009a
commit
3867c452e6
@ -776,7 +776,7 @@ contains
|
||||
return
|
||||
end subroutine fst4_decoded
|
||||
|
||||
subroutine qra66_decoded (this,nutc,sync,nsnr,dt,freq,decoded,nap, &
|
||||
subroutine qra66_decoded (this,nutc,sync,nsnr,dt,freq,decoded,irc, &
|
||||
qual,ntrperiod,fmid,w50)
|
||||
|
||||
use qra66_decode
|
||||
@ -789,42 +789,16 @@ contains
|
||||
real, intent(in) :: dt
|
||||
real, intent(in) :: freq
|
||||
character(len=37), intent(in) :: decoded
|
||||
integer, intent(in) :: nap
|
||||
integer, intent(in) :: irc
|
||||
real, intent(in) :: qual
|
||||
integer, intent(in) :: ntrperiod
|
||||
real, intent(in) :: fmid
|
||||
real, intent(in) :: w50
|
||||
|
||||
character*2 annot
|
||||
character*37 decoded0
|
||||
character*70 line
|
||||
|
||||
decoded0=decoded
|
||||
annot=' '
|
||||
if(nap.ne.0) then
|
||||
write(annot,'(a1,i1)') 'a',nap
|
||||
if(qual.lt.0.17) decoded0(37:37)='?'
|
||||
endif
|
||||
|
||||
if(ntrperiod.lt.60) then
|
||||
write(line,1001) nutc,nsnr,dt,nint(freq),decoded0,annot
|
||||
1001 format(i6.6,i4,f5.1,i5,' ` ',1x,a37,1x,a2)
|
||||
write(13,1002) nutc,nint(sync),nsnr,dt,freq,0,decoded0
|
||||
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FST4')
|
||||
else
|
||||
write(line,1003) nutc,nsnr,dt,nint(freq),decoded0,annot
|
||||
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
|
||||
1004 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a37,' FST4')
|
||||
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)
|
||||
write(*,1001) nutc,nsnr,dt,nint(freq),decoded,irc
|
||||
1001 format(i6.6,i4,f5.1,i5,' + ',1x,a37,1x,i2)
|
||||
write(13,1002) nutc,nint(sync),nsnr,dt,freq,0,decoded
|
||||
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' QRA66')
|
||||
|
||||
call flush(6)
|
||||
call flush(13)
|
||||
|
@ -52,6 +52,8 @@ contains
|
||||
data nc1z/-1/,nc2z/-1/,ng2z/-1/,maxaptypez/-1/
|
||||
save
|
||||
|
||||
! print*,nutc,nfa,nfb,nfqso,ndepth,lapdx,mycall,hiscall,hisgrid
|
||||
|
||||
this%callback => callback
|
||||
nsps=1920
|
||||
baud=12000.0/nsps
|
||||
@ -141,15 +143,12 @@ contains
|
||||
decoded=' '
|
||||
irc=-1
|
||||
endif
|
||||
nft=100 + irc
|
||||
nsnr=nint(snr2)
|
||||
call this%callback(nutc,sync,nsnr,xdt,f0,decoded, &
|
||||
irc,qual,ntrperiod,fmid,w50)
|
||||
else
|
||||
snr2=0.
|
||||
call this%callback(nutc,sYNC,nsnr,xdt,fsig,decoded, &
|
||||
iaptype,qual,ntrperiod,fmid,w50)
|
||||
endif
|
||||
! print*,'QRA66 decoder',nutc,jpk,xdt,f0,sync,snr2,irc,decoded
|
||||
print*,decoded
|
||||
|
||||
return
|
||||
end subroutine decode
|
||||
|
@ -592,6 +592,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
ui->actionISCAT->setActionGroup(modeGroup);
|
||||
ui->actionMSK144->setActionGroup(modeGroup);
|
||||
ui->actionQRA64->setActionGroup(modeGroup);
|
||||
ui->actionQRA66->setActionGroup(modeGroup);
|
||||
ui->actionFreqCal->setActionGroup(modeGroup);
|
||||
|
||||
QActionGroup* saveGroup = new QActionGroup(this);
|
||||
@ -1365,6 +1366,8 @@ void MainWindow::fixStop()
|
||||
} else if (m_mode=="QRA64"){
|
||||
m_hsymStop=179;
|
||||
if(m_config.decode_at_52s()) m_hsymStop=186;
|
||||
} else if (m_mode=="QRA66"){
|
||||
m_hsymStop=49;
|
||||
} else if (m_mode=="FreqCal"){
|
||||
m_hsymStop=((int(m_TRperiod/0.288))/8)*8;
|
||||
} else if (m_mode=="FT8") {
|
||||
@ -2341,6 +2344,8 @@ void MainWindow::setup_status_bar (bool vhf)
|
||||
mode_label.setStyleSheet ("QLabel{background-color: #66ff66}");
|
||||
} else if ("QRA64" == m_mode) {
|
||||
mode_label.setStyleSheet ("QLabel{background-color: #99ff33}");
|
||||
} else if ("QRA66" == m_mode) {
|
||||
mode_label.setStyleSheet ("QLabel{background-color: #99ff33}");
|
||||
} else if ("MSK144" == m_mode) {
|
||||
mode_label.setStyleSheet ("QLabel{background-color: #ff6666}");
|
||||
} else if ("FT4" == m_mode) {
|
||||
@ -2540,8 +2545,8 @@ void MainWindow::on_actionCopyright_Notice_triggered()
|
||||
"General Public License, you must display the following copyright "
|
||||
"notice prominently in your derivative work:\n\n"
|
||||
"\"The algorithms, source code, look-and-feel of WSJT-X and related "
|
||||
"programs, and protocol specifications for the modes FSK441, FT8, JT4, "
|
||||
"JT6M, JT9, JT65, JTMS, QRA64, ISCAT, MSK144 are Copyright (C) "
|
||||
"programs, and protocol specifications for the modes FSK441, FST4, FT8, "
|
||||
"JT4, JT6M, JT9, JT65, JTMS, QRA64, QRA66, ISCAT, MSK144 are Copyright (C) "
|
||||
"2001-2020 by one or more of the following authors: Joseph Taylor, "
|
||||
"K1JT; Bill Somerville, G4WJS; Steven Franke, K9AN; Nico Palermo, "
|
||||
"IV3NWV; Greg Beam, KI7MT; Michael Black, W9MDB; Edson Pereira, PY2SDR; "
|
||||
@ -3065,6 +3070,8 @@ void MainWindow::decode() //decode()
|
||||
ui->actionEnable_AP_JT65->isChecked ();
|
||||
if(m_mode=="QRA64") dec_data.params.nmode=164;
|
||||
if(m_mode=="QRA64") dec_data.params.ntxmode=164;
|
||||
if(m_mode=="QRA66") dec_data.params.nmode=66;
|
||||
if(m_mode=="QRA66") dec_data.params.ntxmode=66;
|
||||
if(m_mode=="JT9+JT65") dec_data.params.nmode=9+65; // = 74
|
||||
if(m_mode=="JT4") {
|
||||
dec_data.params.nmode=4;
|
||||
@ -3465,8 +3472,8 @@ void MainWindow::readFromStdout() //readFromStdout
|
||||
|
||||
//### I think this is where we are preventing Hounds from spotting Fox ###
|
||||
if(m_mode!="FT8" or (SpecOp::HOUND != m_config.special_op_id())) {
|
||||
if(m_mode=="FT8" or m_mode=="FT4" or m_mode=="QRA64" or m_mode=="JT4"
|
||||
or m_mode=="JT65" or m_mode=="JT9" or m_mode=="FST4") {
|
||||
if(m_mode=="FT8" or m_mode=="FT4" or m_mode=="QRA64" or m_mode=="QRA66"
|
||||
or m_mode=="JT4" or m_mode=="JT65" or m_mode=="JT9" or m_mode=="FST4") {
|
||||
auto_sequence (decodedtext, 25, 50);
|
||||
}
|
||||
|
||||
@ -3677,6 +3684,7 @@ void MainWindow::guiUpdate()
|
||||
if(m_modeTx=="JT9") txDuration=1.0 + 85.0*m_nsps/12000.0; // JT9
|
||||
if(m_modeTx=="JT65") txDuration=1.0 + 126*4096/11025.0; // JT65
|
||||
if(m_modeTx=="QRA64") txDuration=1.0 + 84*6912/12000.0; // QRA64
|
||||
if(m_modeTx=="QRA66") txDuration=0.5 + 85*1920/12000.0; // QRA66
|
||||
if(m_modeTx=="WSPR") txDuration=2.0 + 162*8192/12000.0; // WSPR
|
||||
if(m_modeTx=="FST4" or m_mode=="FST4W") { //FST4, FST4W
|
||||
if(m_TRperiod==15) txDuration=1.0 + 160*720/12000.0;
|
||||
@ -3936,6 +3944,11 @@ void MainWindow::guiUpdate()
|
||||
&m_currentMessageType, 22, 22);
|
||||
if(m_modeTx=="QRA64") genqra64_(message, &ichk, msgsent, const_cast<int *> (itone),
|
||||
&m_currentMessageType, 22, 22);
|
||||
if(m_modeTx=="QRA66") {
|
||||
int ichk66=66;
|
||||
genqra64_(message, &ichk66, msgsent, const_cast<int *> (itone),
|
||||
&m_currentMessageType, 22, 22);
|
||||
}
|
||||
if(m_modeTx=="WSPR") genwspr_(message, msgsent, const_cast<int *> (itone),
|
||||
22, 22);
|
||||
if(m_modeTx=="MSK144" or m_modeTx=="FT8" or m_modeTx=="FT4"
|
||||
@ -4669,7 +4682,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
|
||||
|| ("JT9" == m_mode && mode != "@")
|
||||
|| ("MSK144" == m_mode && !("&" == mode || "^" == mode))
|
||||
|| ("QRA64" == m_mode && mode.left (1) != ":")) {
|
||||
return; //Currently we do auto-sequencing only in FT4, FT8, MSK144, and FST4
|
||||
return; //Currently we do auto-sequencing only in FT4, FT8, MSK144, FST4, and QRA66
|
||||
}
|
||||
|
||||
//Skip the rest if no decoded text extracted
|
||||
@ -4777,7 +4790,7 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
|
||||
ui->TxFreqSpinBox->setValue(frequency);
|
||||
}
|
||||
if(m_mode != "JT4" && m_mode != "JT65" && !m_mode.startsWith ("JT9") &&
|
||||
m_mode != "QRA64" && m_mode!="FT8" && m_mode!="FT4") {
|
||||
m_mode != "QRA64" && m_mode != "QRA66" && m_mode!="FT8" && m_mode!="FT4") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -6401,6 +6414,20 @@ void MainWindow::on_actionQRA64_triggered()
|
||||
statusChanged();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionQRA66_triggered()
|
||||
{
|
||||
on_actionFST4_triggered();
|
||||
m_mode="QRA66";
|
||||
m_modeTx="QRA66";
|
||||
ui->actionQRA66->setChecked(true);
|
||||
switch_mode (Modes::QRA64);
|
||||
setup_status_bar (false);
|
||||
m_hsymStop=49;
|
||||
m_wideGraph->setMode(m_mode);
|
||||
m_wideGraph->setModeTx(m_modeTx);
|
||||
m_TRperiod=15.0;
|
||||
}
|
||||
|
||||
void MainWindow::on_actionISCAT_triggered()
|
||||
{
|
||||
m_mode="ISCAT";
|
||||
@ -6449,8 +6476,9 @@ void MainWindow::on_actionMSK144_triggered()
|
||||
if("JT65"==m_mode) ui->actionJT65->setChecked(true);
|
||||
if("JT9_JT65"==m_mode) ui->actionJT9_JT65->setChecked(true);
|
||||
if("ISCAT"==m_mode) ui->actionISCAT->setChecked(true);
|
||||
if("QRA64"==m_mode) ui->actionQRA64->setChecked(true);
|
||||
if("WSPR"==m_mode) ui->actionWSPR->setChecked(true);
|
||||
if("QRA64"==m_mode) ui->actionQRA64->setChecked(true);
|
||||
if("QRA66"==m_mode) ui->actionQRA66->setChecked(true);
|
||||
if("WSPR"==m_mode) ui->actionWSPR->setChecked(true);
|
||||
if("Echo"==m_mode) ui->actionEcho->setChecked(true);
|
||||
if("FreqCal"==m_mode) ui->actionFreqCal->setChecked(true);
|
||||
if("FST4"==m_mode) ui->actionFST4->setChecked(true);
|
||||
@ -7358,6 +7386,14 @@ void MainWindow::transmit (double snr)
|
||||
true, false, snr, m_TRperiod);
|
||||
}
|
||||
|
||||
if (m_modeTx == "QRA66") {
|
||||
toneSpacing=12000.0/1920.0;
|
||||
Q_EMIT sendMessage (m_mode, NUM_QRA66_SYMBOLS,
|
||||
1920.0, ui->TxFreqSpinBox->value () - m_XIT,
|
||||
toneSpacing, m_soundOutput, m_config.audio_output_channel (),
|
||||
true, false, snr, m_TRperiod);
|
||||
}
|
||||
|
||||
if (m_modeTx == "JT9") {
|
||||
int nsub=pow(2,m_nSubMode);
|
||||
int nsps[]={480,240,120,60};
|
||||
@ -9278,6 +9314,7 @@ void MainWindow::set_mode (QString const& mode)
|
||||
else if ("JT9+JT65" == mode) on_actionJT9_JT65_triggered ();
|
||||
else if ("JT65" == mode) on_actionJT65_triggered ();
|
||||
else if ("QRA64" == mode) on_actionQRA64_triggered ();
|
||||
else if ("QRA66" == mode) on_actionQRA66_triggered ();
|
||||
else if ("FreqCal" == mode) on_actionFreqCal_triggered ();
|
||||
else if ("ISCAT" == mode) on_actionISCAT_triggered ();
|
||||
else if ("MSK144" == mode) on_actionMSK144_triggered ();
|
||||
|
@ -48,6 +48,7 @@
|
||||
#define NUM_ISCAT_SYMBOLS 1291 //30*11025/256
|
||||
#define NUM_MSK144_SYMBOLS 144 //s8 + d48 + s8 + d80
|
||||
#define NUM_QRA64_SYMBOLS 84 //63 data + 21 sync
|
||||
#define NUM_QRA66_SYMBOLS 85 //63 data + 22 sync
|
||||
#define NUM_FT8_SYMBOLS 79
|
||||
#define NUM_FT4_SYMBOLS 105
|
||||
#define NUM_FST4_SYMBOLS 160 //240/2 data + 5*8 sync
|
||||
@ -305,6 +306,7 @@ private slots:
|
||||
void on_cbCQTx_toggled(bool b);
|
||||
void on_actionMSK144_triggered();
|
||||
void on_actionQRA64_triggered();
|
||||
void on_actionQRA66_triggered();
|
||||
void on_actionFreqCal_triggered();
|
||||
void splash_done ();
|
||||
void on_measure_check_box_stateChanged (int);
|
||||
|
@ -3001,6 +3001,7 @@ QLabel[oob="true"] {
|
||||
<addaction name="actionJT9_JT65"/>
|
||||
<addaction name="actionJT65"/>
|
||||
<addaction name="actionQRA64"/>
|
||||
<addaction name="actionQRA66"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionISCAT"/>
|
||||
<addaction name="actionMSK144"/>
|
||||
@ -3642,6 +3643,14 @@ QLabel[oob="true"] {
|
||||
<string>Also FST4W</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionQRA66">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>QRA66</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
Loading…
Reference in New Issue
Block a user