Correct logic errors when user has requested VOX control of PTT.

Clear DXCall and DXGrid boxes after logging a QSO.
Add instruction at top of "confirm LogQSO" screen; increase font size on 
its labels.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3113 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-03-27 20:08:00 +00:00
parent e7f8b7e0ca
commit 0192ff74f8
6 changed files with 104 additions and 36 deletions

Binary file not shown.

View File

@ -11,7 +11,7 @@ CAboutDlg::CAboutDlg(QWidget *parent, QString Revision) :
m_Str = "<html><h2>" + m_Revision + "</h2>\n\n"; m_Str = "<html><h2>" + m_Revision + "</h2>\n\n";
m_Str += "WSJT-X implements experimental mode JT9 for <br>"; m_Str += "WSJT-X implements experimental mode JT9 for <br>";
m_Str += "Amateur Radio communication at MF and LF. <br><br>"; m_Str += "Amateur Radio communication at MF and LF. <br><br>";
m_Str += "Copyright 2001-2012 by Joe Taylor, K1JT. Additional <br>"; m_Str += "Copyright 2001-2013 by Joe Taylor, K1JT. Additional <br>";
m_Str += "acknowledgments are contained in the source code. <br>"; m_Str += "acknowledgments are contained in the source code. <br>";
ui->labelTxt->setText(m_Str); ui->labelTxt->setText(m_Str);
} }

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string>Log QSO</string>
</property> </property>
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry"> <property name="geometry">
@ -52,6 +52,31 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Click OK to confirm the following QSO:</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_5"> <layout class="QHBoxLayout" name="horizontalLayout_5">
<item> <item>
@ -74,6 +99,11 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Call</string> <string>Call</string>
</property> </property>
@ -102,6 +132,11 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Date</string> <string>Date</string>
</property> </property>
@ -130,6 +165,11 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Time</string> <string>Time</string>
</property> </property>
@ -158,6 +198,11 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Mode</string> <string>Mode</string>
</property> </property>
@ -186,6 +231,11 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Band</string> <string>Band</string>
</property> </property>
@ -339,6 +389,11 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Rpt Sent</string> <string>Rpt Sent</string>
</property> </property>
@ -367,6 +422,11 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Rpt Rcvd</string> <string>Rpt Rcvd</string>
</property> </property>
@ -395,6 +455,11 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Grid</string> <string>Grid</string>
</property> </property>
@ -426,6 +491,11 @@
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Name</string> <string>Name</string>
</property> </property>
@ -551,6 +621,11 @@
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>Comments</string> <string>Comments</string>
</property> </property>

View File

@ -98,6 +98,9 @@ MainWindow::MainWindow(QWidget *parent) :
connect(&proc_jt9, SIGNAL(readyReadStandardError()), connect(&proc_jt9, SIGNAL(readyReadStandardError()),
this, SLOT(readFromStderr())); this, SLOT(readFromStderr()));
connect(&p3, SIGNAL(error(QProcess::ProcessError)),
this, SLOT(p3_error()));
ui->bandComboBox->setEditable(true); ui->bandComboBox->setEditable(true);
ui->bandComboBox->lineEdit()->setReadOnly(true); ui->bandComboBox->lineEdit()->setReadOnly(true);
ui->bandComboBox->lineEdit()->setAlignment(Qt::AlignCenter); ui->bandComboBox->lineEdit()->setAlignment(Qt::AlignCenter);
@ -1120,6 +1123,13 @@ void MainWindow::jt9_error() //jt9_error
} }
} }
void MainWindow::p3_error() //jt9_error
{
if(!m_killAll) {
QString t="Error running the command\n" + m_cmnd;
msgBox(t);
}
}
void MainWindow::readFromStderr() //readFromStderr void MainWindow::readFromStderr() //readFromStderr
{ {
QByteArray t=proc_jt9.readAllStandardError(); QByteArray t=proc_jt9.readAllStandardError();
@ -1289,32 +1299,22 @@ void MainWindow::guiUpdate()
if(bTxTime and m_iptt==0 and !btxMute) { if(bTxTime and m_iptt==0 and !btxMute) {
icw[0]=m_ncw; icw[0]=m_ncw;
#define NEW
#ifdef NEW
//Raise PTT //Raise PTT
if(m_pttMethodIndex==0) { if(m_pttMethodIndex==0) { //CAT control for PTT
m_cmnd=rig_command() + " T 1"; m_cmnd=rig_command() + " T 1";
p3.start(m_cmnd); p3.start(m_cmnd);
p3.waitForFinished(); p3.waitForFinished();
m_iptt=1; m_iptt=1;
} }
if(m_pttMethodIndex==1 or m_pttMethodIndex==2) { if(m_pttMethodIndex==1 or m_pttMethodIndex==2) { //DTR or RTS
ptt(m_pttPort,1,&m_iptt,&m_COMportOpen); ptt(m_pttPort,1,&m_iptt,&m_COMportOpen);
// ptt(m_pttPort,1,&m_iptt); // ptt(m_pttPort,1,&m_iptt);
} }
// qDebug() << "ptt1Timer" << m_iptt; if(m_pttMethodIndex==3) { //VOX
ptt1Timer->start(200); //Sequencer delay m_iptt=1;
#else
int itx=1;
ptt(m_pttPort,itx,&m_iptt,&m_COMportOpen); // Raise PTT
if(!soundOutThread.isRunning()) {
QString t=ui->tx6->text();
double snr=t.mid(1,5).toDouble();
if(snr>0.0 or snr < -50.0) snr=99.0;
soundOutThread.setTxSNR(snr);
soundOutThread.start(QThread::HighPriority);
} }
#endif ptt1Timer->start(200); //Sequencer delay
} }
if(!bTxTime || btxMute) { if(!bTxTime || btxMute) {
btxok=false; btxok=false;
@ -1417,28 +1417,18 @@ void MainWindow::guiUpdate()
} }
if(nc0 == 0) { if(nc0 == 0) {
#ifdef NEW
//Lower PTT //Lower PTT
if(m_pttMethodIndex==0) { if(m_pttMethodIndex==0) { //CAT
m_cmnd=rig_command() + " T 0"; m_cmnd=rig_command() + " T 0";
p3.start(m_cmnd); p3.start(m_cmnd);
p3.waitForFinished(); p3.waitForFinished();
} }
if(m_pttMethodIndex==1 or m_pttMethodIndex==2) { if(m_pttMethodIndex==1 or m_pttMethodIndex==2) { //DTR-RTS
ptt(m_pttPort,0,&m_iptt,&m_COMportOpen); ptt(m_pttPort,0,&m_iptt,&m_COMportOpen);
} }
#else if(m_pttMethodIndex==3) { //VOX
int itx=0; m_iptt=0;
ptt(m_pttPort,itx,&m_iptt,&m_COMportOpen); // Lower PTT
if(!btxMute) soundOutThread.quitExecution=true;
m_transmitting=false;
if(m_auto) {
m_monitoring=true;
soundInThread.setMonitoring(m_monitoring);
} }
#endif
} }
if(m_iptt == 0 && !btxok) { if(m_iptt == 0 && !btxok) {
@ -1509,8 +1499,6 @@ QString MainWindow::rig_command()
void MainWindow::startTx2() void MainWindow::startTx2()
{ {
if(!soundOutThread.isRunning()) { if(!soundOutThread.isRunning()) {
//qDebug() << "startTx2";
if(!soundOutThread.isRunning()) { if(!soundOutThread.isRunning()) {
QString t=ui->tx6->text(); QString t=ui->tx6->text();
double snr=t.mid(1,5).toDouble(); double snr=t.mid(1,5).toDouble();
@ -1978,6 +1966,10 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button
m_noSuffix,m_toRTTY,m_dBtoComments); m_noSuffix,m_toRTTY,m_dBtoComments);
if(logDlg.exec() == QDialog::Accepted) { if(logDlg.exec() == QDialog::Accepted) {
} }
m_hisCall="";
ui->dxCallEntry->setText("");
m_hisGrid="";
ui->dxGridEntry->setText("");
m_rptSent=""; m_rptSent="";
m_rptRcvd=""; m_rptRcvd="";
m_qsoStart=""; m_qsoStart="";

View File

@ -36,6 +36,7 @@ public slots:
void readFromStdout(); void readFromStdout();
void readFromStderr(); void readFromStderr();
void jt9_error(); void jt9_error();
void p3_error();
protected: protected:
virtual void keyPressEvent( QKeyEvent *e ); virtual void keyPressEvent( QKeyEvent *e );

View File

@ -1,6 +1,6 @@
[Setup] [Setup]
AppName=wsjtx AppName=wsjtx
AppVerName=wsjtx Version 0.8 r3111 AppVerName=wsjtx Version 0.8 r3113
AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT
DefaultDirName=c:\wsjtx DefaultDirName=c:\wsjtx
DefaultGroupName=wsjtx DefaultGroupName=wsjtx