mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-10-31 15:47:10 -04: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
befbaa6ae9
commit
68056ae8fa
5
main.cpp
5
main.cpp
@ -7,6 +7,7 @@
|
||||
#include <fftw3.h>
|
||||
|
||||
#include <QSharedMemory>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QTemporaryFile>
|
||||
#include <QDateTime>
|
||||
#include <QApplication>
|
||||
@ -108,6 +109,8 @@ int main(int argc, char *argv[])
|
||||
// Multiple instances communicate with jt9 via this
|
||||
QSharedMemory mem_jt9;
|
||||
|
||||
auto const env = QProcessEnvironment::systemEnvironment ();
|
||||
|
||||
QApplication a(argc, argv);
|
||||
try
|
||||
{
|
||||
@ -411,7 +414,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// 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();
|
||||
splash.raise ();
|
||||
QObject::connect (&a, SIGNAL (lastWindowClosed()), &a, SLOT (quit()));
|
||||
|
@ -2,6 +2,8 @@
|
||||
#ifndef ASTRO_H
|
||||
#define ASTRO_H
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <QDialog>
|
||||
#include <QScopedPointer>
|
||||
|
||||
@ -34,9 +36,17 @@ public:
|
||||
Correction (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 tx;
|
||||
};
|
||||
|
||||
Correction astroUpdate(QDateTime const& t,
|
||||
QString const& mygrid,
|
||||
QString const& hisgrid,
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <QStringListModel>
|
||||
#include <QSettings>
|
||||
#include <QKeyEvent>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QSharedMemory>
|
||||
#include <QFileDialog>
|
||||
#include <QTextBlock>
|
||||
@ -233,8 +234,9 @@ namespace
|
||||
MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
MultiSettings * multi_settings, QSharedMemory *shdmem,
|
||||
unsigned downSampleFactor,
|
||||
QSplashScreen * splash, QWidget *parent) :
|
||||
QSplashScreen * splash, QProcessEnvironment const& env, QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
m_env {env},
|
||||
m_network_manager {this},
|
||||
m_valid {true},
|
||||
m_splash {splash},
|
||||
@ -266,6 +268,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
m_secBandChanged {0},
|
||||
m_freqNominal {0},
|
||||
m_freqTxNominal {0},
|
||||
m_reverse_Doppler {"1" == env.value ("WSJT_REVERSE_DOPPLER", "0")},
|
||||
m_s6 {0.},
|
||||
m_tRemaining {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 ())
|
||||
, "-t", QDir::toNativeSeparators (m_config.temp_dir ().absolutePath ())
|
||||
};
|
||||
QProcessEnvironment env {QProcessEnvironment::systemEnvironment ()};
|
||||
env.insert ("OMP_STACKSIZE", "4M");
|
||||
proc_jt9.setProcessEnvironment (env);
|
||||
QProcessEnvironment new_env {m_env};
|
||||
new_env.insert ("OMP_STACKSIZE", "4M");
|
||||
proc_jt9.setProcessEnvironment (new_env);
|
||||
proc_jt9.start(QDir::toNativeSeparators (m_appDir) + QDir::separator () +
|
||||
"jt9", jt9_args, QIODevice::ReadWrite | QIODevice::Unbuffered);
|
||||
|
||||
@ -4227,7 +4230,15 @@ void MainWindow::guiUpdate()
|
||||
transmitDisplay (true);
|
||||
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_mode=="MSK144") {
|
||||
@ -8193,6 +8204,10 @@ void MainWindow::astroUpdate ()
|
||||
correction.tx = correction.tx / 10 * 10;
|
||||
}
|
||||
m_astroCorrection = correction;
|
||||
if (m_reverse_Doppler)
|
||||
{
|
||||
m_astroCorrection.reverse ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -63,6 +63,7 @@ namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class QProcessEnvironment;
|
||||
class QSharedMemory;
|
||||
class QSplashScreen;
|
||||
class QSettings;
|
||||
@ -103,7 +104,7 @@ public:
|
||||
|
||||
explicit MainWindow(QDir const& temp_directory, bool multiple, MultiSettings *,
|
||||
QSharedMemory *shdmem, unsigned downSampleFactor,
|
||||
QSplashScreen *,
|
||||
QSplashScreen *, QProcessEnvironment const&,
|
||||
QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
@ -356,6 +357,7 @@ private:
|
||||
void setColorHighlighting();
|
||||
void chkFT4();
|
||||
|
||||
QProcessEnvironment const& m_env;
|
||||
NetworkAccessManager m_network_manager;
|
||||
bool m_valid;
|
||||
QSplashScreen * m_splash;
|
||||
@ -407,6 +409,7 @@ private:
|
||||
Frequency m_freqNominal;
|
||||
Frequency m_freqTxNominal;
|
||||
Astro::Correction m_astroCorrection;
|
||||
bool m_reverse_Doppler;
|
||||
|
||||
double m_s6;
|
||||
double m_tRemaining;
|
||||
|
Loading…
Reference in New Issue
Block a user