diff --git a/devsetup.cpp b/devsetup.cpp index 743231275..816c1ae1a 100644 --- a/devsetup.cpp +++ b/devsetup.cpp @@ -109,6 +109,7 @@ void DevSetup::initDlg() ui.mult570SpinBox->setValue(m_mult570); ui.mult570TxSpinBox->setValue(m_mult570Tx); ui.cal570SpinBox->setValue(m_cal570); + ui.sbTxOffset->setValue(m_TxOffset); sscanf(m_colors.toLatin1(),"%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x", &r,&g,&b,&r0,&g0,&b0,&r1,&g1,&b1,&r2,&g2,&b2,&r3,&g3,&b3); updateColorLabels(); @@ -178,6 +179,7 @@ void DevSetup::accept() m_mult570=ui.mult570SpinBox->value(); m_mult570Tx=ui.mult570TxSpinBox->value(); m_cal570=ui.cal570SpinBox->value(); + m_TxOffset=ui.sbTxOffset->value(); QDialog::accept(); } @@ -342,4 +344,11 @@ void DevSetup::on_rbIQXT_toggled(bool checked) m_bIQxt=checked; ui.mult570TxSpinBox->setEnabled(m_bIQxt); ui.label_25->setEnabled(m_bIQxt); + ui.sbTxOffset->setEnabled(m_bIQxt); + ui.label_26->setEnabled(m_bIQxt); +} + +void DevSetup::on_sbTxOffset_valueChanged(double f) +{ + m_TxOffset=f; } diff --git a/devsetup.h b/devsetup.h index 494e340e9..148f76c4e 100644 --- a/devsetup.h +++ b/devsetup.h @@ -30,6 +30,7 @@ public: double m_fAdd; double m_cal570; + double m_TxOffset; bool m_xpolx; bool m_network; @@ -78,8 +79,8 @@ private slots: void on_sbBlue3_valueChanged(int arg1); void on_pushButton_5_clicked(); void on_mult570TxSpinBox_valueChanged(int arg1); - - void on_rbIQXT_toggled(bool checked); + void on_rbIQXT_toggled(bool checked); + void on_sbTxOffset_valueChanged(double f); private: int r,g,b,r0,g0,b0,r1,g1,b1,r2,g2,b2,r3,g3,b3; diff --git a/devsetup.ui b/devsetup.ui index 3e9617f76..31f7708cd 100644 --- a/devsetup.ui +++ b/devsetup.ui @@ -17,7 +17,7 @@ - 0 + 3 @@ -1461,17 +1461,17 @@ Si570 Control - + - 40 - 40 + 41 + 41 272 - 220 + 248 - - + + @@ -1502,7 +1502,7 @@ - + Qt::Vertical @@ -1518,7 +1518,7 @@ - + @@ -1570,7 +1570,56 @@ - + + + + + + Tx Offset (MHz): + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + 3 + + + 150.000000000000000 + + + 130.900000000000006 + + + + + + @@ -1622,7 +1671,7 @@ - + @@ -1674,7 +1723,7 @@ - + Qt::Vertical @@ -1690,7 +1739,7 @@ - + Initialize IQ+ on startup diff --git a/mainwindow.cpp b/mainwindow.cpp index 217e67eb0..9f710462e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -255,6 +255,7 @@ MainWindow::MainWindow(QWidget *parent) : g_pWideGraph->m_mult570=m_mult570; g_pWideGraph->m_mult570Tx=m_mult570Tx; g_pWideGraph->m_cal570=m_cal570; + g_pWideGraph->m_TxOffset=m_TxOffset; if(m_initIQplus) g_pWideGraph->initIQplus(); // Create "m_worked", a dictionary of all calls in wsjt.log @@ -379,6 +380,7 @@ void MainWindow::writeSettings() settings.setValue("Mult570",m_mult570); settings.setValue("Mult570Tx",m_mult570Tx); settings.setValue("Cal570",m_cal570); + settings.setValue("TxOffset",m_TxOffset); settings.setValue("Colors",m_colors); settings.endGroup(); } @@ -471,6 +473,7 @@ void MainWindow::readSettings() m_mult570=settings.value("Mult570",2).toInt(); m_mult570Tx=settings.value("Mult570Tx",1).toInt(); m_cal570=settings.value("Cal570",0.0).toDouble(); + m_TxOffset=settings.value("TxOffset",130.9).toDouble(); m_colors=settings.value("Colors","000066ff0000ffff00969696646464").toString(); settings.endGroup(); @@ -634,6 +637,7 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog dlg.m_initIQplus=m_initIQplus; dlg.m_bIQxt=m_bIQxt; dlg.m_cal570=m_cal570; + dlg.m_TxOffset=m_TxOffset; dlg.m_mult570=m_mult570; dlg.m_mult570Tx=m_mult570Tx; dlg.m_colors=m_colors; @@ -673,6 +677,7 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog g_pMessages->setColors(m_colors); g_pBandMap->setColors(m_colors); m_cal570=dlg.m_cal570; + m_TxOffset=dlg.m_TxOffset; m_mult570Tx=dlg.m_mult570Tx; g_pWideGraph->m_mult570=m_mult570; g_pWideGraph->m_mult570Tx=m_mult570Tx; @@ -1388,6 +1393,7 @@ void MainWindow::guiUpdate() static int iptt=0; static bool btxok0=false; static bool bTune0=false; + static bool bMonitoring0=false; static int nc0=1; static int nc1=1; static char msgsent[23]; @@ -1407,7 +1413,12 @@ void MainWindow::guiUpdate() double t2p=fmod(tsec,120.0/m_nfast); bool bTxTime = (t2p >= tx1) and (t2p < tx2); - if(bTune0 and !bTune) btxok=false; + if(bTune0 and !bTune) { + btxok=false; + m_monitoring=bMonitoring0; + soundInThread.setMonitoring(m_monitoring); + } + if(bTune and !bTune0) bMonitoring0=m_monitoring; bTune0=bTune; if(m_auto or bTune) { diff --git a/mainwindow.h b/mainwindow.h index 0d218377d..2268f2533 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -170,6 +170,7 @@ private: // double m_IQamp; // double m_IQphase; double m_cal570; + double m_TxOffset; bool m_monitoring; bool m_transmitting; diff --git a/set570.cpp b/set570.cpp index 50a98d6f4..ca9b4ef9e 100644 --- a/set570.cpp +++ b/set570.cpp @@ -88,6 +88,11 @@ void sweepm_freq(void); int set570(double freq_MHz) { +//### +// qDebug() << "A" << freq_MHz; +// if(freq_MHz != 999.0) return 0; +//### + char * my_usbSerialID = NULL; // MAIN MENU DIALOG diff --git a/widegraph.cpp b/widegraph.cpp index 42a8c56d9..12aff93ea 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -360,7 +360,9 @@ void WideGraph::tx570() if(m_bForceCenterFreq) datcom_.fcenter=m_dForceCenterFreq; m_bIQxt=true; 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; + double f1=m_mult570Tx*(1.0+0.000001*m_cal570) * (f - m_TxOffset); + #ifdef WIN32 int iret=set570(f1); if(iret != 0) { diff --git a/widegraph.h b/widegraph.h index c5862bdd6..c70e6dd8e 100644 --- a/widegraph.h +++ b/widegraph.h @@ -21,6 +21,7 @@ public: qint32 m_mult570Tx; double m_dForceCenterFreq; double m_cal570; + double m_TxOffset; void dataSink2(float s[], int nkhz, int ihsym, int ndiskdata, uchar lstrong[]);