mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-21 19:55:20 -05:00
Testing options
Two new environment variables to control special testing behaviour: * WSJT_TX_BOTH - set to "1" to force transmission on both periods. * WSJT_REVERSE_DOPPLER - set to "1" to transpose Tx and Rx Doppler corrections. Use this to test Doppler tracking on a terrestrial link.
This commit is contained in:
parent
072da278ee
commit
ab780a324a
5
main.cpp
5
main.cpp
@ -7,6 +7,7 @@
|
|||||||
#include <fftw3.h>
|
#include <fftw3.h>
|
||||||
|
|
||||||
#include <QSharedMemory>
|
#include <QSharedMemory>
|
||||||
|
#include <QProcessEnvironment>
|
||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
@ -108,6 +109,8 @@ int main(int argc, char *argv[])
|
|||||||
// Multiple instances communicate with jt9 via this
|
// Multiple instances communicate with jt9 via this
|
||||||
QSharedMemory mem_jt9;
|
QSharedMemory mem_jt9;
|
||||||
|
|
||||||
|
auto const env = QProcessEnvironment::systemEnvironment ();
|
||||||
|
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -411,7 +414,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// run the application UI
|
// run the application UI
|
||||||
MainWindow w(temp_dir, multiple, &multi_settings, &mem_jt9, downSampleFactor, &splash);
|
MainWindow w(temp_dir, multiple, &multi_settings, &mem_jt9, downSampleFactor, &splash, env);
|
||||||
w.show();
|
w.show();
|
||||||
splash.raise ();
|
splash.raise ();
|
||||||
QObject::connect (&a, SIGNAL (lastWindowClosed()), &a, SLOT (quit()));
|
QObject::connect (&a, SIGNAL (lastWindowClosed()), &a, SLOT (quit()));
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
#ifndef ASTRO_H
|
#ifndef ASTRO_H
|
||||||
#define ASTRO_H
|
#define ASTRO_H
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
|
|
||||||
@ -34,9 +36,17 @@ public:
|
|||||||
Correction (Correction const&) = default;
|
Correction (Correction const&) = default;
|
||||||
Correction& operator = (Correction const&) = default;
|
Correction& operator = (Correction const&) = default;
|
||||||
|
|
||||||
|
// testing facility used to test Doppler corrections on
|
||||||
|
// terrestrial links
|
||||||
|
void reverse ()
|
||||||
|
{
|
||||||
|
std::swap (rx, tx);
|
||||||
|
}
|
||||||
|
|
||||||
FrequencyDelta rx;
|
FrequencyDelta rx;
|
||||||
FrequencyDelta tx;
|
FrequencyDelta tx;
|
||||||
};
|
};
|
||||||
|
|
||||||
Correction astroUpdate(QDateTime const& t,
|
Correction astroUpdate(QDateTime const& t,
|
||||||
QString const& mygrid,
|
QString const& mygrid,
|
||||||
QString const& hisgrid,
|
QString const& hisgrid,
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <QStringListModel>
|
#include <QStringListModel>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
|
#include <QProcessEnvironment>
|
||||||
#include <QSharedMemory>
|
#include <QSharedMemory>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QTextBlock>
|
#include <QTextBlock>
|
||||||
@ -233,8 +234,9 @@ namespace
|
|||||||
MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||||
MultiSettings * multi_settings, QSharedMemory *shdmem,
|
MultiSettings * multi_settings, QSharedMemory *shdmem,
|
||||||
unsigned downSampleFactor,
|
unsigned downSampleFactor,
|
||||||
QSplashScreen * splash, QWidget *parent) :
|
QSplashScreen * splash, QProcessEnvironment const& env, QWidget *parent) :
|
||||||
QMainWindow(parent),
|
QMainWindow(parent),
|
||||||
|
m_env {env},
|
||||||
m_network_manager {this},
|
m_network_manager {this},
|
||||||
m_valid {true},
|
m_valid {true},
|
||||||
m_splash {splash},
|
m_splash {splash},
|
||||||
@ -266,6 +268,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
m_secBandChanged {0},
|
m_secBandChanged {0},
|
||||||
m_freqNominal {0},
|
m_freqNominal {0},
|
||||||
m_freqTxNominal {0},
|
m_freqTxNominal {0},
|
||||||
|
m_reverse_Doppler {"1" == env.value ("WSJT_REVERSE_DOPPLER", "0")},
|
||||||
m_s6 {0.},
|
m_s6 {0.},
|
||||||
m_tRemaining {0.},
|
m_tRemaining {0.},
|
||||||
m_TRperiod {60.0},
|
m_TRperiod {60.0},
|
||||||
@ -926,9 +929,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
, "-a", QDir::toNativeSeparators (m_config.writeable_data_dir ().absolutePath ())
|
, "-a", QDir::toNativeSeparators (m_config.writeable_data_dir ().absolutePath ())
|
||||||
, "-t", QDir::toNativeSeparators (m_config.temp_dir ().absolutePath ())
|
, "-t", QDir::toNativeSeparators (m_config.temp_dir ().absolutePath ())
|
||||||
};
|
};
|
||||||
QProcessEnvironment env {QProcessEnvironment::systemEnvironment ()};
|
QProcessEnvironment new_env {m_env};
|
||||||
env.insert ("OMP_STACKSIZE", "4M");
|
new_env.insert ("OMP_STACKSIZE", "4M");
|
||||||
proc_jt9.setProcessEnvironment (env);
|
proc_jt9.setProcessEnvironment (new_env);
|
||||||
proc_jt9.start(QDir::toNativeSeparators (m_appDir) + QDir::separator () +
|
proc_jt9.start(QDir::toNativeSeparators (m_appDir) + QDir::separator () +
|
||||||
"jt9", jt9_args, QIODevice::ReadWrite | QIODevice::Unbuffered);
|
"jt9", jt9_args, QIODevice::ReadWrite | QIODevice::Unbuffered);
|
||||||
|
|
||||||
@ -4227,7 +4230,15 @@ void MainWindow::guiUpdate()
|
|||||||
transmitDisplay (true);
|
transmitDisplay (true);
|
||||||
statusUpdate ();
|
statusUpdate ();
|
||||||
}
|
}
|
||||||
if(!m_btxok && m_btxok0 && g_iptt==1) stopTx();
|
if(!m_btxok && m_btxok0 && g_iptt==1)
|
||||||
|
{
|
||||||
|
stopTx();
|
||||||
|
if ("1" == m_env.value ("WSJT_TX_BOTH", "0"))
|
||||||
|
{
|
||||||
|
m_txFirst = !m_txFirst;
|
||||||
|
ui->txFirstCheckBox->setChecked (m_txFirst);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(m_startAnother) {
|
if(m_startAnother) {
|
||||||
if(m_mode=="MSK144") {
|
if(m_mode=="MSK144") {
|
||||||
@ -8193,6 +8204,10 @@ void MainWindow::astroUpdate ()
|
|||||||
correction.tx = correction.tx / 10 * 10;
|
correction.tx = correction.tx / 10 * 10;
|
||||||
}
|
}
|
||||||
m_astroCorrection = correction;
|
m_astroCorrection = correction;
|
||||||
|
if (m_reverse_Doppler)
|
||||||
|
{
|
||||||
|
m_astroCorrection.reverse ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -63,6 +63,7 @@ namespace Ui {
|
|||||||
class MainWindow;
|
class MainWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class QProcessEnvironment;
|
||||||
class QSharedMemory;
|
class QSharedMemory;
|
||||||
class QSplashScreen;
|
class QSplashScreen;
|
||||||
class QSettings;
|
class QSettings;
|
||||||
@ -103,7 +104,7 @@ public:
|
|||||||
|
|
||||||
explicit MainWindow(QDir const& temp_directory, bool multiple, MultiSettings *,
|
explicit MainWindow(QDir const& temp_directory, bool multiple, MultiSettings *,
|
||||||
QSharedMemory *shdmem, unsigned downSampleFactor,
|
QSharedMemory *shdmem, unsigned downSampleFactor,
|
||||||
QSplashScreen *,
|
QSplashScreen *, QProcessEnvironment const&,
|
||||||
QWidget *parent = nullptr);
|
QWidget *parent = nullptr);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
|
|
||||||
@ -356,6 +357,7 @@ private:
|
|||||||
void setColorHighlighting();
|
void setColorHighlighting();
|
||||||
void chkFT4();
|
void chkFT4();
|
||||||
|
|
||||||
|
QProcessEnvironment const& m_env;
|
||||||
NetworkAccessManager m_network_manager;
|
NetworkAccessManager m_network_manager;
|
||||||
bool m_valid;
|
bool m_valid;
|
||||||
QSplashScreen * m_splash;
|
QSplashScreen * m_splash;
|
||||||
@ -407,6 +409,7 @@ private:
|
|||||||
Frequency m_freqNominal;
|
Frequency m_freqNominal;
|
||||||
Frequency m_freqTxNominal;
|
Frequency m_freqTxNominal;
|
||||||
Astro::Correction m_astroCorrection;
|
Astro::Correction m_astroCorrection;
|
||||||
|
bool m_reverse_Doppler;
|
||||||
|
|
||||||
double m_s6;
|
double m_s6;
|
||||||
double m_tRemaining;
|
double m_tRemaining;
|
||||||
|
Loading…
Reference in New Issue
Block a user