Re-enable MSK144 click-to-decode, top panel only.

Fix the improper display of "Fast" checkbox.
Disable "CQ nnn" checkbox if MyCall is not K1JT or K9AN.
Use AppDir as path to execute the LDPC encode program.
Don't display submodes in mode label for JTMSK, MSK144.
Make Rx Freq spinner invisible in MSK144 mode.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7001 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-08-04 19:30:27 +00:00
parent 6dca7af05c
commit 6dd881cea7
5 changed files with 27 additions and 13 deletions

View File

@ -61,7 +61,7 @@ subroutine fast_decode(id2,narg,ntrperiod,bShMsgs,line,pchk_file, &
if(ib.gt.ntrperiod*12000) ib=ntrperiod*12000 if(ib.gt.ntrperiod*12000) ib=ntrperiod*12000
nz=ib-ia+1 nz=ib-ia+1
! print*,ia,ib,nz,ndat0,t0,t1 ! print*,ia,ib,nz,ndat0,t0,t1
if(npick.ne.0) go to 900 !### TEMPORARILY DISABLE PICK DECODES ### if(npick.gt.1) go to 900 !### DISABLE PICK FROM LOWER PANEL###
if(newdat.eq.1 .or. npick.le.1) then if(newdat.eq.1 .or. npick.le.1) then
call msk144_decode(id2(ia),nz,nutc,0,pchk_file,mycall,hiscall, & call msk144_decode(id2(ia),nz,nutc,0,pchk_file,mycall,hiscall, &
bShMsgs,ntol,t0,line) bShMsgs,ntol,t0,line)

View File

@ -1,4 +1,5 @@
subroutine genmsk144(msg0,ichk,msgsent,i4tone,itype,pchk_file,ldpc_msg) subroutine genmsk144(msg0,ichk,msgsent,i4tone,itype,pchk_file,ldpc_msg, &
encodeExeFile)
!!!!!!!!!!!!!!!!!! Experimental small blocklength ldpc version !!!!!!!!!!!!!!!!!! Experimental small blocklength ldpc version
! s8 + 48bits + s8 + 80 bits = 144 bits (72ms message duration) ! s8 + 48bits + s8 + 80 bits = 144 bits (72ms message duration)
@ -22,7 +23,7 @@ subroutine genmsk144(msg0,ichk,msgsent,i4tone,itype,pchk_file,ldpc_msg)
use iso_c_binding, only: c_loc,c_size_t use iso_c_binding, only: c_loc,c_size_t
use packjt use packjt
use hashing use hashing
character*512 pchk_file,gen_file,ldpc_msg,ldpc_cw character*512 pchk_file,gen_file,ldpc_msg,ldpc_cw,encodeExeFile
character*120 fname1,fname2 character*120 fname1,fname2
character*2048 cmnd character*2048 cmnd
character*22 msg0 character*22 msg0
@ -139,9 +140,9 @@ subroutine genmsk144(msg0,ichk,msgsent,i4tone,itype,pchk_file,ldpc_msg)
write(24,1010) msgbits write(24,1010) msgbits
1010 format(80i1) 1010 format(80i1)
close(24) close(24)
cmnd='encode "'//trim(pchk_file)//'" "'//trim(gen_file)//'" "' & cmnd=trim(encodeExeFile)//' "'//trim(pchk_file)//'" "'// &
//trim(fname1)//'" "'//trim(fname2)//'"' trim(gen_file)//'" "'//trim(fname1)//'" "'//trim(fname2)//'"'
call system(cmnd) call system(trim(cmnd))
open(24,file=fname2,status='old') open(24,file=fname2,status='old')
read(24,1020) codeword read(24,1020) codeword
1020 format(128i1) 1020 format(128i1)

View File

@ -78,8 +78,8 @@ extern "C" {
int* itext, int len1, int len2); int* itext, int len1, int len2);
void genmsk144_(char* msg, int* ichk, char* msgsent, int itone[], void genmsk144_(char* msg, int* ichk, char* msgsent, int itone[],
int* itext, char pchkFile[], char ldpcMsgFile[], int* itext, char pchkFile[], char ldpcMsgFile[], char encodeExeFile[],
int len1, int len2, int len3, int len4); int len1, int len2, int len3, int len4, int len5);
void gen65_(char* msg, int* ichk, char* msgsent, int itone[], void gen65_(char* msg, int* ichk, char* msgsent, int itone[],
int* itext, int len1, int len2); int* itext, int len1, int len2);
@ -844,6 +844,13 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
if(i<ldpcMsgFile.length()) m_ldpcMsgFile[i]=ba[i]; if(i<ldpcMsgFile.length()) m_ldpcMsgFile[i]=ba[i];
} }
QString encodeExeFile = QDir::toNativeSeparators (m_appDir) +
QDir::separator () + "encode";
ba = encodeExeFile.toLocal8Bit();
for(int i=0; i<512; i++) {
m_encodeExeFile[i]=32;
if(i<encodeExeFile.length()) m_encodeExeFile[i]=ba[i];
}
statusChanged(); statusChanged();
//### TEMPORARY MESSAGE TO USERS ### //### TEMPORARY MESSAGE TO USERS ###
@ -1379,6 +1386,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog
m_mode=="MSK144" or m_mode=="QRA64"); m_mode=="MSK144" or m_mode=="QRA64");
VHF_features_enabled(b); VHF_features_enabled(b);
VHF_controls_visible(b); VHF_controls_visible(b);
if(m_mode=="MSK144" or m_mode=="JTMSK") ui->cbFast9->setVisible(false);
} }
m_config.transceiver_online (); m_config.transceiver_online ();
@ -2764,7 +2772,7 @@ void MainWindow::guiUpdate()
if(m_modeTx=="MSK144") { if(m_modeTx=="MSK144") {
genmsk144_(message, &ichk, msgsent, const_cast<int *> (itone), genmsk144_(message, &ichk, msgsent, const_cast<int *> (itone),
&m_currentMessageType, &m_pchkFile[0], &m_ldpcMsgFile[0], &m_currentMessageType, &m_pchkFile[0], &m_ldpcMsgFile[0],
len1, len1, 512, 512); &m_encodeExeFile[0], len1, len1, 512, 512, 512);
if(m_restart) { if(m_restart) {
int nsym=144; int nsym=144;
if(itone[40]==-40) nsym=40; if(itone[40]==-40) nsym=40;
@ -3902,7 +3910,6 @@ void MainWindow::on_actionJT9_triggered()
m_nsps=6912; m_nsps=6912;
m_FFTSize = m_nsps / 2; m_FFTSize = m_nsps / 2;
Q_EMIT FFTSize (m_FFTSize); Q_EMIT FFTSize (m_FFTSize);
QString t1=(QString)QChar(short(m_nSubMode+65));
m_hsymStop=173; m_hsymStop=173;
if(m_config.decode_at_52s()) m_hsymStop=179; if(m_config.decode_at_52s()) m_hsymStop=179;
bool bVHF=m_config.enable_VHF_features(); bool bVHF=m_config.enable_VHF_features();
@ -4008,6 +4015,9 @@ void MainWindow::on_actionMSK144_triggered()
ui->rptSpinBox->setSingleStep(1); ui->rptSpinBox->setSingleStep(1);
ui->sbFtol->setMinimum(23); ui->sbFtol->setMinimum(23);
ui->sbFtol->setMaximum(25); ui->sbFtol->setMaximum(25);
bool b=m_config.my_callsign()=="K1JT" or m_config.my_callsign()=="K9AN";
ui->cbCQRx->setEnabled(b);
ui->cbFast9->setVisible(false);
} }
void MainWindow::on_actionQRA64_triggered() void MainWindow::on_actionQRA64_triggered()
@ -4297,6 +4307,7 @@ void MainWindow::switch_mode (Mode mode)
ui->rptSpinBox->setMaximum(49); ui->rptSpinBox->setMaximum(49);
ui->sbFtol->setMinimum(21); ui->sbFtol->setMinimum(21);
ui->sbFtol->setMaximum(27); ui->sbFtol->setMaximum(27);
ui->RxFreqSpinBox->setVisible(m_mode!="MSK144");
} }
void MainWindow::WSPR_config(bool b) void MainWindow::WSPR_config(bool b)
@ -5180,7 +5191,8 @@ void MainWindow::on_sbSubmode_valueChanged(int n)
m_nSubMode=n; m_nSubMode=n;
m_wideGraph->setSubMode(m_nSubMode); m_wideGraph->setSubMode(m_nSubMode);
mode_label.setText (m_mode); mode_label.setText (m_mode);
if (m_mode != "JT9+JT65" || !m_config.enable_VHF_features ()) { if ((m_mode != "JT9+JT65" and m_mode != "MSK144" and m_mode != "JTMSK" and
!m_mode.startsWith ("WSPR")) || !m_config.enable_VHF_features ()) {
mode_label.setText (mode_label.text () + " " + QChar {short (m_nSubMode + 65)}); mode_label.setText (mode_label.text () + " " + QChar {short (m_nSubMode + 65)});
} }
if(m_mode=="ISCAT") { if(m_mode=="ISCAT") {

View File

@ -427,6 +427,7 @@ private:
char m_msg[100][80]; char m_msg[100][80];
char m_pchkFile[512]; char m_pchkFile[512];
char m_ldpcMsgFile[512]; char m_ldpcMsgFile[512];
char m_encodeExeFile[512];
// labels in status bar // labels in status bar
QLabel tx_status_label; QLabel tx_status_label;

View File

@ -913,7 +913,7 @@ QLabel[oob=&quot;true&quot;] {
<item> <item>
<widget class="QCheckBox" name="cbCQRx"> <widget class="QCheckBox" name="cbCQRx">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>false</bool>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@ -2516,7 +2516,7 @@ QPushButton[state=&quot;ok&quot;] {
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Save decoded</string> <string>Save decoded</string>