Add optional antenna description for PSK Reporter. (Presently implemented

only for Windows.)


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3344 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-06-06 17:40:09 +00:00
parent 39854e0b36
commit 0fe2869799
5 changed files with 79 additions and 51 deletions

View File

@ -127,6 +127,7 @@ void DevSetup::initDlg()
ui.myGridEntry->setPalette(pal); ui.myGridEntry->setPalette(pal);
ui.myCallEntry->setText(m_myCall); ui.myCallEntry->setText(m_myCall);
ui.myGridEntry->setText(m_myGrid); ui.myGridEntry->setText(m_myGrid);
ui.pskReporterAntenna->setText(m_pskAntenna);
ui.idIntSpinBox->setValue(m_idInt); ui.idIntSpinBox->setValue(m_idInt);
ui.pttMethodComboBox->setCurrentIndex(m_pttMethodIndex); ui.pttMethodComboBox->setCurrentIndex(m_pttMethodIndex);
@ -237,6 +238,7 @@ void DevSetup::accept()
m_myCall=ui.myCallEntry->text(); m_myCall=ui.myCallEntry->text();
m_myGrid=ui.myGridEntry->text(); m_myGrid=ui.myGridEntry->text();
m_pskAntenna=ui.pskReporterAntenna->text();
m_idInt=ui.idIntSpinBox->value(); m_idInt=ui.idIntSpinBox->value();
m_pttMethodIndex=ui.pttMethodComboBox->currentIndex(); m_pttMethodIndex=ui.pttMethodComboBox->currentIndex();
m_pttPort=ui.pttComboBox->currentIndex(); m_pttPort=ui.pttComboBox->currentIndex();
@ -342,6 +344,8 @@ void DevSetup::on_myGridEntry_editingFinished()
void DevSetup::on_cbPSKReporter_clicked(bool b) void DevSetup::on_cbPSKReporter_clicked(bool b)
{ {
m_pskReporter=b; m_pskReporter=b;
ui.label_8->setEnabled(m_pskReporter);
ui.pskReporterAntenna->setEnabled(m_pskReporter);
} }
void DevSetup::on_pttMethodComboBox_activated(int index) void DevSetup::on_pttMethodComboBox_activated(int index)
@ -509,6 +513,9 @@ void DevSetup::on_pttMethodComboBox_currentIndexChanged(int index)
void DevSetup::enableWidgets() void DevSetup::enableWidgets()
{ {
ui.label_8->setEnabled(m_pskReporter);
ui.pskReporterAntenna->setEnabled(m_pskReporter);
ui.cbEnableCAT->setChecked(m_catEnabled); ui.cbEnableCAT->setChecked(m_catEnabled);
ui.cbDTRoff->setChecked(m_bDTRoff); ui.cbDTRoff->setChecked(m_bDTRoff);
ui.rigComboBox->setEnabled(m_catEnabled); ui.rigComboBox->setEnabled(m_catEnabled);

View File

@ -57,6 +57,7 @@ public:
QString m_azelDir; QString m_azelDir;
QString m_catPort; QString m_catPort;
QString m_handshake; QString m_handshake;
QString m_pskAntenna;
QStringList m_macro; QStringList m_macro;
QStringList m_dFreq; QStringList m_dFreq;

View File

@ -7,13 +7,13 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>548</width> <width>548</width>
<height>521</height> <height>493</height>
</rect> </rect>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>548</width> <width>569</width>
<height>521</height> <height>493</height>
</size> </size>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -316,37 +316,30 @@
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_6"> <layout class="QHBoxLayout" name="horizontalLayout_6">
<item> <item>
<widget class="QLabel" name="label_3"> <widget class="QCheckBox" name="cbPSKReporter">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>146</width>
<height>20</height> <height>0</height>
</size> </size>
</property> </property>
<property name="text">
<string>ID Interval (min):</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="idIntSpinBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>60</width> <width>146</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Select CW ID interval (0 for none)</string> <string>Send spots to PSK Reporter web site</string>
</property> </property>
<property name="minimum"> <property name="text">
<number>0</number> <string>Enable PSK Reporter</string>
</property>
<property name="maximum">
<number>10</number>
</property> </property>
</widget> </widget>
</item> </item>
@ -387,35 +380,56 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="cbPSKReporter"> <widget class="QLabel" name="label_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>146</width> <width>0</width>
<height>0</height> <height>20</height>
</size> </size>
</property> </property>
<property name="text">
<string>ID Interval (min):</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="idIntSpinBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>146</width> <width>60</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Send spots to PSK Reporter web site</string> <string>Select CW ID interval (0 for none)</string>
</property> </property>
<property name="text"> <property name="minimum">
<string>Enable PSK Reporter</string> <number>0</number>
</property>
<property name="maximum">
<number>10</number>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>Antenna for PSK Reporter:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="pskReporterAntenna"/>
</item>
</layout>
</item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
@ -2435,8 +2449,6 @@
<tabstop>pttMethodComboBox</tabstop> <tabstop>pttMethodComboBox</tabstop>
<tabstop>pttComboBox</tabstop> <tabstop>pttComboBox</tabstop>
<tabstop>idIntSpinBox</tabstop> <tabstop>idIntSpinBox</tabstop>
<tabstop>cbID73</tabstop>
<tabstop>cbPSKReporter</tabstop>
<tabstop>cbEnableCAT</tabstop> <tabstop>cbEnableCAT</tabstop>
<tabstop>rigComboBox</tabstop> <tabstop>rigComboBox</tabstop>
<tabstop>catPortComboBox</tabstop> <tabstop>catPortComboBox</tabstop>

View File

@ -421,7 +421,8 @@ void MainWindow::writeSettings()
settings.setValue("SaveTxPower",m_saveTxPower); settings.setValue("SaveTxPower",m_saveTxPower);
settings.setValue("SaveComments",m_saveComments); settings.setValue("SaveComments",m_saveComments);
settings.setValue("TxPower",m_txPower); settings.setValue("TxPower",m_txPower);
settings.value("LogComments",m_logComments); settings.setValue("LogComments",m_logComments);
settings.setValue("PSKantenna",m_pskAntenna);
settings.endGroup(); settings.endGroup();
} }
@ -551,6 +552,7 @@ void MainWindow::readSettings()
m_saveComments=settings.value("SaveComments",false).toBool(); m_saveComments=settings.value("SaveComments",false).toBool();
m_txPower=settings.value("TxPower","").toString(); m_txPower=settings.value("TxPower","").toString();
m_logComments=settings.value("LogComments","").toString(); m_logComments=settings.value("LogComments","").toString();
m_pskAntenna=settings.value("PSKantenna","").toString();
settings.endGroup(); settings.endGroup();
if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() && if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() &&
@ -630,6 +632,7 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog
DevSetup dlg(this); DevSetup dlg(this);
dlg.m_myCall=m_myCall; dlg.m_myCall=m_myCall;
dlg.m_myGrid=m_myGrid; dlg.m_myGrid=m_myGrid;
dlg.m_pskAntenna=m_pskAntenna;
dlg.m_idInt=m_idInt; dlg.m_idInt=m_idInt;
dlg.m_pttMethodIndex=m_pttMethodIndex; dlg.m_pttMethodIndex=m_pttMethodIndex;
dlg.m_pttPort=m_pttPort; dlg.m_pttPort=m_pttPort;
@ -670,6 +673,7 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog
if(dlg.exec() == QDialog::Accepted) { if(dlg.exec() == QDialog::Accepted) {
m_myCall=dlg.m_myCall; m_myCall=dlg.m_myCall;
m_myGrid=dlg.m_myGrid; m_myGrid=dlg.m_myGrid;
m_pskAntenna=dlg.m_pskAntenna;
m_idInt=dlg.m_idInt; m_idInt=dlg.m_idInt;
m_pttMethodIndex=dlg.m_pttMethodIndex; m_pttMethodIndex=dlg.m_pttMethodIndex;
m_pttPort=dlg.m_pttPort; m_pttPort=dlg.m_pttPort;
@ -1441,8 +1445,9 @@ void MainWindow::readFromStdout() //readFromStdout
remote.toWCharArray(tremote); remote.toWCharArray(tremote);
QString local="station_callsign," + m_myCall + "," + QString local="station_callsign," + m_myCall + "," +
"my_gridsquare," + m_myGrid + "," + "my_gridsquare," + m_myGrid + ",";
"programid,WSJT-X,programversion," + rev.mid(6,4) + ",,"; if(m_pskAntenna!="") local += "my_antenna," + m_pskAntenna + ",";
local += "programid,WSJT-X,programversion," + rev.mid(6,4) + ",,";
wchar_t tlocal[256]; wchar_t tlocal[256];
local.toWCharArray(tlocal); local.toWCharArray(tlocal);
@ -1461,16 +1466,18 @@ void MainWindow::readFromStdout() //readFromStdout
} }
#else #else
if(b and !m_diskData and okToPost) { if(b and !m_diskData and okToPost) {
int i1=msg.indexOf(" "); int i1=msg.indexOf(" ");
QString c2=msg.mid(i1+1); QString c2=msg.mid(i1+1);
int i2=c2.indexOf(" "); int i2=c2.indexOf(" ");
QString g2=c2.mid(i2+1,4); QString g2=c2.mid(i2+1,4);
c2=c2.mid(0,i2); c2=c2.mid(0,i2);
int nHz=t.mid(22,4).toInt(); int nHz=t.mid(22,4).toInt();
QString freq = QString::number((int)(1000000.0*m_dialFreq + nHz + 0.5)); QString freq = QString::number((int)(1000000.0*m_dialFreq +
QString snr= QString::number(t.mid(10,3).toInt()); nHz + 0.5));
if(gridOK(g2)) QString snr= QString::number(t.mid(10,3).toInt());
psk_Reporter->addRemoteStation(c2,g2,freq,"JT9",snr,QString::number(QDateTime::currentDateTime().toTime_t())); if(gridOK(g2))
psk_Reporter->addRemoteStation(c2,g2,freq,"JT9",snr,
QString::number(QDateTime::currentDateTime().toTime_t()));
} }
#endif #endif
} }

View File

@ -322,6 +322,7 @@ private:
QString m_QSOmsg; QString m_QSOmsg;
QString m_txPower; QString m_txPower;
QString m_logComments; QString m_logComments;
QString m_pskAntenna;
QStringList m_macro; QStringList m_macro;
QStringList m_dFreq; QStringList m_dFreq;