diff --git a/WSJT-X_Users_Guide_v1.2.docx b/WSJT-X_Users_Guide_v1.2.docx new file mode 100644 index 000000000..2c9cb0cd5 Binary files /dev/null and b/WSJT-X_Users_Guide_v1.2.docx differ diff --git a/about.cpp b/about.cpp index 515fa712d..923c304ff 100644 --- a/about.cpp +++ b/about.cpp @@ -13,8 +13,8 @@ CAboutDlg::CAboutDlg(QWidget *parent, QString Revision) : m_Str += "Amateur Radio communication.

"; m_Str += "Copyright 2001-2013 by Joe Taylor, K1JT -- with grateful
"; m_Str += "acknowledgment for contributions from AC6SL, AE4JY,
"; - m_Str += "G4KLA, G4WJS, K3WYC, KA6MAL, KA9Q, PY2SDR, VK3ACF,
"; - m_Str += "VK4BDJ, and W4TV.
"; + m_Str += "DJ0OT, G4KLA, G4WJS, K3WYC, KA6MAL, KA9Q, KK1D,
"; + m_Str += "PY2SDR, VK3ACF, VK4BDJ, and W4TV.
"; ui->labelTxt->setText(m_Str); } diff --git a/mainwindow.cpp b/mainwindow.cpp index 5322b7aa6..503ce1e9d 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -138,6 +138,11 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QString *thekey, \ font.setWeight(fontWeight2); ui->decodedTextBrowser->setFont(font); ui->decodedTextBrowser2->setFont(font); + font=ui->readFreq->font(); + font.setFamily("helvetica"); + font.setPointSize(9); + font.setWeight(75); + ui->readFreq->setFont(font); QTimer *guiTimer = new QTimer(this); connect(guiTimer, SIGNAL(timeout()), this, SLOT(guiUpdate())); @@ -293,6 +298,8 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QString *thekey, \ border-color: black; min-width: 5em; padding: 3px;}"; genStdMsgs(m_rpt); + m_ntx=6; + ui->txrb6->setChecked(true); if(m_mode!="JT9" and m_mode!="JT65" and m_mode!="JT9+JT65") m_mode="JT9"; on_actionWide_Waterfall_triggered(); //### g_pWideGraph->setRxFreq(m_rxFreq); @@ -350,25 +357,8 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QString *thekey, \ ui->decodedTextLabel->setText(t); ui->decodedTextLabel2->setText(t); - /* -#ifdef WIN32 - if(m_pskReporter) { - rc=ReporterInitialize(NULL,NULL); - if(rc==0) { - m_pskReporterInit=true; - } else { - m_pskReporterInit=false; - rc=ReporterGetInformation(buffer,256); - msgBox(QString::fromStdWString(buffer)); - } - } -#endif - -#ifdef UNIX -*/ psk_Reporter = new PSK_Reporter(this); psk_Reporter->setLocalStation(m_myCall,m_myGrid, m_antDescription[m_band], "WSJT-X r" + rev.mid(6,4) ); -//#endif m_logBook.init(); @@ -814,33 +804,11 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog ui->bandComboBox->clear(); ui->bandComboBox->addItems(dlg.m_bandDescription); ui->bandComboBox->setCurrentIndex(m_band); - -/* -#ifdef WIN32 - if(dlg.m_pskReporter!=m_pskReporter) { - if(dlg.m_pskReporter) { - int rc=ReporterInitialize(NULL,NULL); - if(rc==0) { - m_pskReporterInit=true; - } else { - m_pskReporterInit=false; - rc=ReporterGetInformation(buffer,256); - msgBox(QString::fromStdWString(buffer)); - } - } else { - rc=ReporterUninitialize(); - m_pskReporterInit=false; - } - } -#endif -*/ m_pskReporter=dlg.m_pskReporter; -//#ifdef UNIX if(m_pskReporter) { psk_Reporter->setLocalStation(m_myCall, m_myGrid, m_antDescription[m_band], "WSJT-X r" + rev.mid(6,4) ); } -//#endif m_After73=dlg.m_After73; @@ -862,6 +830,8 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog if(dlg.m_bSplit!=m_bSplit or dlg.m_bXIT!=m_bXIT) { m_bSplit=dlg.m_bSplit; + if(m_bSplit) ui->readFreq->setText("S"); + if(!m_bSplit) ui->readFreq->setText(""); m_bXIT=dlg.m_bXIT; if(m_bSplit or m_bXIT) setXIT(m_txFreq); if(m_bRigOpen and !m_bSplit) { @@ -1154,7 +1124,7 @@ void MainWindow::msgBox(QString t) //msgBox void MainWindow::on_actionOnline_Users_Guide_triggered() //Display manual { QDesktopServices::openUrl(QUrl( - "http://www.physics.princeton.edu/pulsar/K1JT/WSJT-X_Users_Guide_v1.1.1.pdf", + "http://www.physics.princeton.edu/pulsar/K1JT/WSJT-X_Users_Guide_v1.2.pdf", QUrl::TolerantMode)); } @@ -1595,30 +1565,6 @@ void MainWindow::readFromStdout() //readFromStdout wchar_t tremote[256]; remote.toWCharArray(tremote); -/* -#ifdef WIN32 - if(m_pskReporterInit and b and !m_diskData and okToPost) { - - QString local="station_callsign#" + m_myCall + "#" + - "my_gridsquare#" + m_myGrid + "#"; - if (m_antDescription[m_band]!="") - local += "my_antenna#" + m_antDescription[m_band] + "#"; - local += "programid#WSJT-X#programversion#" + rev.mid(6,4) + "##"; - wchar_t tlocal[256]; - local.toWCharArray(tlocal); - - int flags=REPORTER_SOURCE_AUTOMATIC; - rc=ReporterSeenCallsign(tremote,tlocal,flags); - if(rc!=0) { - ReporterGetInformation(buffer,256); - } - rc=ReporterTickle(); - if(rc!=0) { - rc=ReporterGetInformation(buffer,256); - } - } -#else -*/ if(m_pskReporter and b and !m_diskData and okToPost) { psk_Reporter->setLocalStation(m_myCall, m_myGrid, m_antDescription[m_band], "WSJT-X r" + rev.mid(6,4) ); QString freq = QString::number(nfreq); @@ -1628,7 +1574,6 @@ void MainWindow::readFromStdout() //readFromStdout QString::number(QDateTime::currentDateTime().toTime_t())); } } -//#endif } } } @@ -2822,9 +2767,7 @@ void MainWindow::on_bandComboBox_activated(int index) out << QDateTime::currentDateTimeUtc().toString("yyyy-MMM-dd hh:mm") << " " << m_dialFreq << " MHz " << m_mode << endl; f2.close(); -#ifdef UNIX psk_Reporter->setLocalStation(m_myCall, m_myGrid, m_antDescription[m_band], "WSJT-X r" + rev.mid(6,4) ); -#endif } void MainWindow::on_actionPrompt_to_log_QSO_triggered(bool checked) @@ -3045,10 +2988,6 @@ void MainWindow::rigOpen() border-width: 0px; border-radius: 5px;}"); } - QFont font=ui->readFreq->font(); - font.setPointSize(9); - font.setWeight(75); - ui->readFreq->setFont(font); if(m_bSplit) ui->readFreq->setText("S"); if(!m_bSplit) ui->readFreq->setText(""); } else { diff --git a/mainwindow.ui b/mainwindow.ui index 91d6f3913..12ffbe46f 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -1214,7 +1214,16 @@ p, li { white-space: pre-wrap; } 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -1345,7 +1354,7 @@ p, li { white-space: pre-wrap; } - true + false buttonGroup @@ -1687,6 +1696,9 @@ p, li { white-space: pre-wrap; } + + true + buttonGroup @@ -1757,7 +1769,16 @@ p, li { white-space: pre-wrap; } 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -2202,7 +2223,7 @@ p, li { white-space: pre-wrap; } 0 0 760 - 22 + 21 diff --git a/soundin_1.cpp b/soundin_1.cpp deleted file mode 100644 index bfbaddce0..000000000 --- a/soundin_1.cpp +++ /dev/null @@ -1,210 +0,0 @@ -#include "soundin.h" -#include - -#define FRAMES_PER_BUFFER 1024 -//#define NSMAX 1365 -#define NSMAX 6827 -#define NTMAX 120 - -extern "C" { -#include -extern struct { - float ss[184*NSMAX]; //This is "common/jt9com/..." in fortran - float savg[NSMAX]; -// float c0[2*NTMAX*1500]; - short int d2[NTMAX*12000]; - int nutc; //UTC as integer, HHMM - int ndiskdat; //1 ==> data read from *.wav file - int ntrperiod; //TR period (seconds) - int mousefqso; //User-selected QSO freq (kHz) - int newdat; //1 ==> new data, must do long FFT - int npts8; //npts in c0() array - int nfa; //Low decode limit (Hz) - int nfb; //High decode limit (Hz) - int ntol; //+/- decoding range around fQSO (Hz) - int kin; - int nzhsym; - int nsave; - int nagain; - int ndepth; - int ntxmode; - int nmode; - char datetime[20]; -} jt9com_; -} - -QString reportAudioError(QAudio::Error audioError) -{ - switch (audioError) { - case QAudio::NoError: Q_ASSERT(false); - case QAudio::OpenError: return QObject::tr( - "An error opening the audio device has occurred."); - case QAudio::IOError: return QObject::tr( - "An error occurred during read/write of audio device."); - case QAudio::UnderrunError: return QObject::tr( - "Audio data not being fed to the audio device fast enough."); - case QAudio::FatalError: return QObject::tr( - "Non-recoverable error, audio device not usable at this time."); - } - Q_ASSERT(false); - return ""; -} - -typedef struct -{ - int kin; //Parameters sent to/from the portaudio callback function - int ncall; - bool bzero; - bool monitoring; -} paUserData; - - -void SoundInThread::run() //SoundInThread::run() -{ - quitExecution = false; - -//---------------------------------------------------- Soundcard Setup - - quitExecutionMutex.lock(); - quitExecution = false; - quitExecutionMutex.unlock(); - - //### Temporary: hardwired device selection - QAudioDeviceInfo DeviceInfo; - QList m_InDevices; - QAudioDeviceInfo m_InDeviceInfo; - m_InDevices = DeviceInfo.availableDevices(QAudio::AudioInput); - inputDevice = m_InDevices.at(0); - //### - - const char* pcmCodec = "audio/pcm"; - QAudioFormat audioFormat = inputDevice.preferredFormat(); - audioFormat.setChannelCount(1); - audioFormat.setCodec(pcmCodec); - audioFormat.setSampleRate(12000); - audioFormat.setSampleType(QAudioFormat::SignedInt); - audioFormat.setSampleSize(16); - - if (!audioFormat.isValid()) { - emit error(tr("Requested audio format is not available.")); - return; - } - - QAudioInput audioInput(inputDevice, audioFormat); - if (audioInput.error() != QAudio::NoError) { - emit error(reportAudioError(audioInput.error())); - return; - } - - QIODevice* stream = audioInput.start(); - - bool qe = quitExecution; - static int ntr0=99; - int k=0; - int nsec; - int ntr; - int nBusy=0; - int nstep0=0; - int nsps0=0; - qint16 buf0[4096]; - -//---------------------------------------------- Soundcard input loop - while (!qe) { - quitExecutionMutex.lock(); - qe = quitExecution; - quitExecutionMutex.unlock(); - if (qe) break; - - // Error checking... - if (audioInput.error() != QAudio::NoError) { - emit error(reportAudioError(audioInput.error())); - return; - } - -// udata.monitoring=m_monitoring; - qint64 ms = QDateTime::currentMSecsSinceEpoch(); - ms=ms % 86400000; - nsec = ms/1000; // Time according to this computer - ntr = nsec % m_TRperiod; - -// Reset buffer pointer and symbol number at start of minute - if(ntr < ntr0 or !m_monitoring or m_nsps!=nsps0) { - nstep0=0; - nsps0=m_nsps; -// udata.bzero=true; - k=0; - } -// k=udata.kin; - - // How many new samples have been acquired? - const qint32 bytesReady = audioInput.bytesReady(); - Q_ASSERT(bytesReady >= 0); - Q_ASSERT(bytesReady % 2 == 0); - if (bytesReady == 0) { - msleep(50); - continue; - } - - // Get the new samples - qint32 bytesRead; - bytesRead = stream->read((char*)buf0, bytesReady); - Q_ASSERT(bytesRead <= bytesReady); - if (bytesRead < 0) { - emit error(tr("audio stream QIODevice::read returned -1.")); - return; - } - Q_ASSERT(bytesRead % 2 == 0); - -// memcpy(jt9com_.d2[k],buf0,bytesRead); -// k+=bytesRead/2; - - for(int i=0; im_nDevIn=n; -} - -void SoundInThread::quit() //quit() -{ - quitExecution = true; -} - -void SoundInThread::setMonitoring(bool b) //setMonitoring() -{ - m_monitoring = b; -} - -void SoundInThread::setPeriod(int ntrperiod, int nsps) -{ - m_TRperiod=ntrperiod; - m_nsps=nsps; -} - -int SoundInThread::mstep() -{ - return m_step; -} - diff --git a/soundin_1.h b/soundin_1.h deleted file mode 100644 index f81322ea8..000000000 --- a/soundin_1.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef SOUNDIN_H -#define SOUNDIN_H - -#include -#include - -#include -#include -#include - -// Thread gets audio data from soundcard and signals when a buffer of -// specified size is available. -class SoundInThread : public QThread -{ - Q_OBJECT - bool quitExecution; // if true, thread exits gracefully - QMutex quitExecutionMutex; // protects the quitExecution variable - QAudioDeviceInfo inputDevice; // audioinput device name - -protected: - virtual void run(); - -public: - bool m_dataSinkBusy; - - SoundInThread(): - quitExecution(false), - m_dataSinkBusy(false) - { - } - - void setInputDevice(qint32 n); - void setMonitoring(bool b); - void setPeriod(int ntrperiod, int nsps); - int mstep(); - -signals: - void readyForFFT(int k); - void error(const QString& message); - void status(const QString& message); - -public slots: - void quit(); - -private: - qint32 m_step; - qint32 m_nDevIn; - qint32 m_TRperiod; - qint32 m_TRperiod0; - qint32 m_nsps; - bool m_monitoring; -}; -#endif // SOUNDIN_H