mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 21:58:38 -05:00
More work toward changes for IQ+ Tx: in particular, code for the txTune
window. Still need to implement actions in soundout for Tx image rejection, and action of the Tune button. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@3632 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
ba4f27518a
commit
93b6755e4b
@ -17,6 +17,7 @@
|
||||
short int iwave[2*60*11025]; //Wave file for Tx audio
|
||||
int nwave; //Length of Tx waveform
|
||||
bool btxok; //True if OK to transmit
|
||||
bool bTune;
|
||||
double outputLatency; //Latency in seconds
|
||||
double txPower;
|
||||
double iqAmp;
|
||||
@ -150,6 +151,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
m_colors="000066ff0000ffff00969696646464";
|
||||
m_nfast=1;
|
||||
m_nsave=0;
|
||||
bTune=false;
|
||||
txPower=1.0;
|
||||
iqAmp=1.0;
|
||||
iqPhase=0.0;
|
||||
@ -337,8 +339,8 @@ void MainWindow::writeSettings()
|
||||
settings.setValue("Editor",m_editorCommand);
|
||||
settings.setValue("DXCCpfx",m_dxccPfx);
|
||||
settings.setValue("Timeout",m_timeout);
|
||||
settings.setValue("IQamp",m_IQamp);
|
||||
settings.setValue("IQphase",m_IQphase);
|
||||
settings.setValue("IQamp",iqAmp);
|
||||
settings.setValue("IQphase",iqPhase);
|
||||
settings.setValue("ApplyIQcal",m_applyIQcal);
|
||||
settings.setValue("dPhi",m_dPhi);
|
||||
settings.setValue("Fcal",m_fCal);
|
||||
@ -414,8 +416,8 @@ void MainWindow::readSettings()
|
||||
m_editorCommand=settings.value("Editor","notepad").toString();
|
||||
m_dxccPfx=settings.value("DXCCpfx","").toString();
|
||||
m_timeout=settings.value("Timeout",20).toInt();
|
||||
m_IQamp=settings.value("IQamp",1.0000).toDouble();
|
||||
m_IQphase=settings.value("IQphase",0.0).toDouble();
|
||||
iqAmp=settings.value("IQamp",1.0000).toDouble();
|
||||
iqPhase=settings.value("IQphase",0.0).toDouble();
|
||||
m_applyIQcal=settings.value("ApplyIQcal",0).toInt();
|
||||
ui->actionApply_IQ_Calibration->setChecked(m_applyIQcal!=0);
|
||||
m_dPhi=settings.value("dPhi",0).toInt();
|
||||
@ -2114,13 +2116,8 @@ void MainWindow::on_actionTx_Tune_triggered()
|
||||
{
|
||||
if(g_pTxTune==NULL) {
|
||||
g_pTxTune = new TxTune(0);
|
||||
/*
|
||||
g_pTxTune->setWindowTitle("Astronomical Data");
|
||||
Qt::WindowFlags flags = Qt::Dialog | Qt::WindowCloseButtonHint |
|
||||
Qt::WindowMinimizeButtonHint;
|
||||
g_pTxTune->setWindowFlags(flags);
|
||||
g_pTxTune->setGeometry(m_astroGeom);
|
||||
*/
|
||||
}
|
||||
g_pTxTune->set_iqAmp(iqAmp);
|
||||
g_pTxTune->set_iqPhase(iqPhase);
|
||||
g_pTxTune->show();
|
||||
}
|
||||
|
@ -164,8 +164,8 @@ private:
|
||||
qint32 m_TRperiod;
|
||||
|
||||
double m_fAdd;
|
||||
double m_IQamp;
|
||||
double m_IQphase;
|
||||
// double m_IQamp;
|
||||
// double m_IQphase;
|
||||
double m_cal570;
|
||||
|
||||
bool m_monitoring;
|
||||
|
@ -1,6 +1,6 @@
|
||||
[Setup]
|
||||
AppName=MAP65
|
||||
AppVerName=MAP65 Version 2.5 r3597
|
||||
AppVerName=MAP65 Version 2.5 r3603
|
||||
AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT
|
||||
DefaultDirName=c:\MAP65
|
||||
DefaultGroupName=MAP65
|
||||
|
@ -11,6 +11,7 @@ extern float gran(); //Noise generator (for tests only)
|
||||
extern short int iwave[2*60*11025]; //Wave file for Tx audio
|
||||
extern int nwave;
|
||||
extern bool btxok;
|
||||
extern bool bTune;
|
||||
extern double outputLatency;
|
||||
extern double txPower;
|
||||
extern double iqAmp;
|
||||
@ -39,12 +40,18 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer,
|
||||
int nsec;
|
||||
int nTRperiod=udata->nTRperiod;
|
||||
|
||||
// qDebug() << txPower << iqAmp << iqPhase;
|
||||
|
||||
// Get System time
|
||||
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
|
||||
tsec = 0.001*ms;
|
||||
nsec = ms/1000;
|
||||
|
||||
static int nsec0=0;
|
||||
if(nsec!=nsec0) {
|
||||
qDebug() << txPower << iqAmp << iqPhase << bTune;
|
||||
nsec0=nsec;
|
||||
}
|
||||
|
||||
if(btxok and !btxok0) { //Start (or re-start) a transmission
|
||||
n=nsec/nTRperiod;
|
||||
tstart=tsec - n*nTRperiod - 1.0;
|
||||
|
48
txtune.cpp
48
txtune.cpp
@ -5,6 +5,7 @@
|
||||
extern double txPower;
|
||||
extern double iqAmp;
|
||||
extern double iqPhase;
|
||||
extern bool bTune;
|
||||
|
||||
TxTune::TxTune(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
@ -26,9 +27,56 @@ void TxTune::on_pwrSlider_valueChanged(int n)
|
||||
void TxTune::on_ampSlider_valueChanged(int n)
|
||||
{
|
||||
iqAmp=1.0 + 0.001*n;
|
||||
ui->ampSpinBox->setValue(iqAmp);
|
||||
}
|
||||
|
||||
void TxTune::on_phaSlider_valueChanged(int n)
|
||||
{
|
||||
iqPhase=0.1*n;
|
||||
ui->phaSpinBox->setValue(iqPhase);
|
||||
}
|
||||
|
||||
void TxTune::on_ampSpinBox_valueChanged(double d)
|
||||
{
|
||||
iqAmp=d;
|
||||
int n=1000.0*(iqAmp-1.0);
|
||||
ui->ampSlider->setValue(n);
|
||||
}
|
||||
|
||||
void TxTune::on_phaSpinBox_valueChanged(double d)
|
||||
{
|
||||
iqPhase=d;
|
||||
int n=10.0*iqPhase;
|
||||
ui->phaSlider->setValue(n);
|
||||
}
|
||||
|
||||
void TxTune::set_iqAmp(double d)
|
||||
{
|
||||
ui->ampSpinBox->setValue(d);
|
||||
}
|
||||
|
||||
void TxTune::set_iqPhase(double d)
|
||||
{
|
||||
ui->phaSpinBox->setValue(d);
|
||||
}
|
||||
|
||||
void TxTune::on_cbTxImage_toggled(bool b)
|
||||
{
|
||||
ui->ampSlider->setEnabled(b);
|
||||
ui->ampSpinBox->setEnabled(b);
|
||||
ui->labAmp->setEnabled(b);
|
||||
ui->phaSlider->setEnabled(b);
|
||||
ui->phaSpinBox->setEnabled(b);
|
||||
ui->labPha->setEnabled(b);
|
||||
}
|
||||
|
||||
void TxTune::on_pbTune_clicked()
|
||||
{
|
||||
bTune = !bTune;
|
||||
if(bTune) {
|
||||
QString style="QPushButton{background-color: red;}";
|
||||
ui->pbTune->setStyleSheet(style);
|
||||
} else {
|
||||
ui->pbTune->setStyleSheet("");
|
||||
}
|
||||
}
|
||||
|
8
txtune.h
8
txtune.h
@ -19,6 +19,14 @@ private slots:
|
||||
void on_pwrSlider_valueChanged(int n);
|
||||
void on_ampSlider_valueChanged(int n);
|
||||
void on_phaSlider_valueChanged(int n);
|
||||
void on_ampSpinBox_valueChanged(double d);
|
||||
void on_phaSpinBox_valueChanged(double d);
|
||||
void on_cbTxImage_toggled(bool b);
|
||||
void on_pbTune_clicked();
|
||||
|
||||
public:
|
||||
void set_iqAmp(double d);
|
||||
void set_iqPhase(double d);
|
||||
|
||||
private:
|
||||
Ui::TxTune *ui;
|
||||
|
198
txtune.ui
198
txtune.ui
@ -35,9 +35,9 @@
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>40</y>
|
||||
<width>331</width>
|
||||
<x>12</x>
|
||||
<y>64</y>
|
||||
<width>371</width>
|
||||
<height>141</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -55,67 +55,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>I/Q Amplitude:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSlider" name="ampSlider">
|
||||
<property name="minimum">
|
||||
<number>-100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>I/Q Phase:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSlider" name="phaSlider">
|
||||
<property name="minimum">
|
||||
<number>-100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSlider" name="pwrSlider">
|
||||
<property name="maximum">
|
||||
@ -135,6 +74,137 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="pbTune">
|
||||
<property name="text">
|
||||
<string>Tune</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3">
|
||||
<widget class="QCheckBox" name="cbTxImage">
|
||||
<property name="text">
|
||||
<string>Enable Tx Image Adjustment</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labAmp">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>I/Q Amplitude:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QDoubleSpinBox" name="ampSpinBox">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.950000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1.050000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.001000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="labPha">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>I/Q Phase:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSlider" name="phaSlider">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QDoubleSpinBox" name="phaSpinBox">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-10.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>10.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSlider" name="ampSlider">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-50</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
Loading…
Reference in New Issue
Block a user