Updates for IQ+ XT.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@3599 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-11-10 16:11:04 +00:00
parent 7db0b2f893
commit ba8a771001
6 changed files with 55 additions and 11 deletions

View File

@ -1493,6 +1493,8 @@ void MainWindow::guiUpdate()
lab2->setText("QSO Freq: " + QString::number(g_pWideGraph->QSOfreq())); lab2->setText("QSO Freq: " + QString::number(g_pWideGraph->QSOfreq()));
lab3->setText("QSO DF: " + QString::number(g_pWideGraph->DF())); lab3->setText("QSO DF: " + QString::number(g_pWideGraph->DF()));
g_pWideGraph->updateFreqLabel();
if(m_startAnother) { if(m_startAnother) {
m_startAnother=false; m_startAnother=false;
on_actionOpen_next_in_directory_triggered(); on_actionOpen_next_in_directory_triggered();

View File

@ -753,8 +753,12 @@ void CPlotter::setLockTxRx(bool b)
} }
} }
double CPlotter::rxFreq()
{
return floor(datcom_.fcenter) + 0.001*m_fQSO + 0.000001*m_DF;
}
double CPlotter::txFreq() double CPlotter::txFreq()
{ {
qDebug() << "Q" << m_TXfreq << m_TxDF;
return m_TXfreq + 0.000001*m_TxDF; return m_TXfreq + 0.000001*m_TxDF;
} }

View File

@ -68,7 +68,9 @@ public:
void set2Dspec(bool b); void set2Dspec(bool b);
double fGreen(); double fGreen();
void setLockTxRx(bool b); void setLockTxRx(bool b);
double rxFreq();
double txFreq(); double txFreq();
// void updateFreqLabel();
signals: signals:
void freezeDecode0(int n); void freezeDecode0(int n);

View File

@ -14,7 +14,9 @@ WideGraph::WideGraph(QWidget *parent) :
this->setMaximumWidth(2048); this->setMaximumWidth(2048);
this->setMaximumHeight(880); this->setMaximumHeight(880);
ui->widePlot->setMaximumHeight(800); ui->widePlot->setMaximumHeight(800);
m_bIQxt=false;
ui->labFreq->setStyleSheet( \
"QLabel { background-color : black; color : yellow; }");
connect(ui->widePlot, SIGNAL(freezeDecode1(int)),this, connect(ui->widePlot, SIGNAL(freezeDecode1(int)),this,
SLOT(wideFreezeDecode(int))); SLOT(wideFreezeDecode(int)));
@ -47,13 +49,23 @@ WideGraph::WideGraph(QWidget *parent) :
settings.endGroup(); settings.endGroup();
} }
WideGraph::~WideGraph() WideGraph::~WideGraph()
{ {
saveSettings(); saveSettings();
delete ui; delete ui;
} }
void WideGraph::resizeEvent(QResizeEvent* ) //resizeEvent()
{
if(!size().isValid()) return;
// m_Size = size();
int w = size().width();
int h = size().height();
// qDebug() << "A" << w << h << ui->labFreq->geometry();
ui->labFreq->setGeometry(QRect(w-160,h-100,131,41));
// qDebug() << "B" << w << h << ui->labFreq->geometry();
}
void WideGraph::saveSettings() void WideGraph::saveSettings()
{ {
//Save user's settings //Save user's settings
@ -335,11 +347,8 @@ void WideGraph::on_cbLockTxRx_stateChanged(int n)
void WideGraph::rx570() void WideGraph::rx570()
{ {
double f=m_mult570*(1.0+0.000001*m_cal570)*m_dForceCenterFreq; double f=m_mult570*(1.0+0.000001*m_cal570)*m_dForceCenterFreq;
// qDebug() << "Set Rx Freq" << f;
#ifdef WIN32 #ifdef WIN32
int iret=set570(f); int iret=set570(f);
// int iret=0;
if(iret != 0) { if(iret != 0) {
QMessageBox mb; QMessageBox mb;
if(iret==-1) mb.setText("Failed to open Si570."); if(iret==-1) mb.setText("Failed to open Si570.");
@ -352,15 +361,12 @@ void WideGraph::rx570()
void WideGraph::tx570() void WideGraph::tx570()
{ {
if(m_bForceCenterFreq) datcom_.fcenter=m_dForceCenterFreq; if(m_bForceCenterFreq) datcom_.fcenter=m_dForceCenterFreq;
m_bIQxt=true;
double f=ui->widePlot->txFreq(); double f=ui->widePlot->txFreq();
double f1=m_mult570Tx*(1.0+0.000001*m_cal570) * f; double f1=m_mult570Tx*(1.0+0.000001*m_cal570) * f;
int nHz = 1000000.0*f1 + 0.5; int nHz = 1000000.0*f1 + 0.5;
// qDebug() << "Set Tx Freq" << f1 << nHz;
#ifdef WIN32 #ifdef WIN32
int iret=set570(f1); int iret=set570(f1);
// int iret=0;
if(iret != 0) { if(iret != 0) {
QMessageBox mb; QMessageBox mb;
if(iret==-1) mb.setText("Failed to open Si570."); if(iret==-1) mb.setText("Failed to open Si570.");
@ -369,3 +375,12 @@ void WideGraph::tx570()
} }
#endif #endif
} }
void WideGraph::updateFreqLabel()
{
double rxFreq=ui->widePlot->rxFreq();
double txFreq=ui->widePlot->txFreq();
QString t;
t.sprintf("Rx: %10.6f\nTx: %10.6f",rxFreq,txFreq);
ui->labFreq->setText(t);
}

View File

@ -40,6 +40,7 @@ public:
double fGreen(); double fGreen();
void rx570(); void rx570();
void tx570(); void tx570();
void updateFreqLabel();
qint32 m_qsoFreq; qint32 m_qsoFreq;
@ -53,6 +54,7 @@ public slots:
protected: protected:
virtual void keyPressEvent( QKeyEvent *e ); virtual void keyPressEvent( QKeyEvent *e );
void resizeEvent(QResizeEvent* event);
private slots: private slots:
void on_waterfallAvgSpinBox_valueChanged(int arg1); void on_waterfallAvgSpinBox_valueChanged(int arg1);
@ -65,10 +67,10 @@ private slots:
void on_fCenterLineEdit_editingFinished(); void on_fCenterLineEdit_editingFinished();
void on_pbSetRxHardware_clicked(); void on_pbSetRxHardware_clicked();
void on_cbSpec2d_toggled(bool checked); void on_cbSpec2d_toggled(bool checked);
void on_cbLockTxRx_stateChanged(int arg1); void on_cbLockTxRx_stateChanged(int arg1);
private: private:
bool m_bIQxt;
qint32 m_waterfallAvg; qint32 m_waterfallAvg;
qint32 m_fCal; qint32 m_fCal;
qint32 m_fSample; qint32 m_fSample;

View File

@ -42,6 +42,25 @@
<property name="lineWidth"> <property name="lineWidth">
<number>1</number> <number>1</number>
</property> </property>
<widget class="QLabel" name="labFreq">
<property name="geometry">
<rect>
<x>1015</x>
<y>230</y>
<width>131</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Rx: 144.118.200
Tx: 144.127.317</string>
</property>
</widget>
</widget> </widget>
</item> </item>
<item> <item>