Add features for new LO scheme in IQ+ XT.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@5024 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2015-03-09 19:33:34 +00:00
parent a5a421a671
commit 7eca852cac
8 changed files with 96 additions and 17 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -17,7 +17,7 @@
<item>
<widget class="QTabWidget" name="ioTabWidget">
<property name="currentIndex">
<number>0</number>
<number>3</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
@ -1461,17 +1461,17 @@
<attribute name="title">
<string>Si570 Control</string>
</attribute>
<widget class="QWidget" name="layoutWidget_6">
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>40</x>
<y>40</y>
<x>41</x>
<y>41</y>
<width>272</width>
<height>220</height>
<height>248</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_19">
<item>
<widget class="QLabel" name="label_24">
@ -1502,7 +1502,7 @@
</item>
</layout>
</item>
<item>
<item row="1" column="0">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -1518,7 +1518,7 @@
</property>
</spacer>
</item>
<item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLabel" name="label_12">
@ -1570,7 +1570,56 @@
</item>
</layout>
</item>
<item>
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_21">
<item>
<widget class="QLabel" name="label_26">
<property name="text">
<string>Tx Offset (MHz):</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_22">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QDoubleSpinBox" name="sbTxOffset">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="maximum">
<double>150.000000000000000</double>
</property>
<property name="value">
<double>130.900000000000006</double>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_20">
<item>
<widget class="QLabel" name="label_25">
@ -1622,7 +1671,7 @@
</item>
</layout>
</item>
<item>
<item row="5" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLabel" name="label_13">
@ -1674,7 +1723,7 @@
</item>
</layout>
</item>
<item>
<item row="6" column="0">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -1690,7 +1739,7 @@
</property>
</spacer>
</item>
<item>
<item row="7" column="0">
<widget class="QCheckBox" name="cbInitIQplus">
<property name="text">
<string>Initialize IQ+ on startup</string>

View File

@ -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) {

View File

@ -170,6 +170,7 @@ private:
// double m_IQamp;
// double m_IQphase;
double m_cal570;
double m_TxOffset;
bool m_monitoring;
bool m_transmitting;

View File

@ -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

View File

@ -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) {

View File

@ -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[]);