From c0fc6ef382c46c3443aa4bf7888cbbe9c158cbbf Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Fri, 29 May 2015 19:23:54 +0000 Subject: [PATCH] Commit wspr tone frequency patch and fix GrayLineDuration typo git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5465 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- Modulator.cpp | 2 +- Modulator.hpp | 6 +++--- mainwindow.cpp | 4 ++-- mainwindow.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Modulator.cpp b/Modulator.cpp index dce905b4f..e4918d7ad 100644 --- a/Modulator.cpp +++ b/Modulator.cpp @@ -43,7 +43,7 @@ Modulator::Modulator (unsigned frameRate, unsigned periodLengthInSeconds, } void Modulator::start (unsigned symbolsLength, double framesPerSymbol, - unsigned frequency, double toneSpacing, + double frequency, double toneSpacing, SoundOutput * stream, Channel channel, bool synchronize, double dBSNR) { diff --git a/Modulator.hpp b/Modulator.hpp index 630d33e81..de16fbd65 100644 --- a/Modulator.hpp +++ b/Modulator.hpp @@ -27,15 +27,15 @@ public: void close () override; bool isTuning () const {return m_tuning;} - unsigned frequency () const {return m_frequency;} + double frequency () const {return m_frequency;} bool isActive () const {return m_state != Idle;} void setSpread(double s) {m_fSpread=s;} void setPeriod(unsigned p) {m_period=p;} - Q_SLOT void start (unsigned symbolsLength, double framesPerSymbol, unsigned frequency, double toneSpacing, SoundOutput *, Channel = Mono, bool synchronize = true, double dBSNR = 99.); + Q_SLOT void start (unsigned symbolsLength, double framesPerSymbol, double frequency, double toneSpacing, SoundOutput *, Channel = Mono, bool synchronize = true, double dBSNR = 99.); Q_SLOT void stop (bool quick = false); Q_SLOT void tune (bool newState = true); - Q_SLOT void setFrequency (unsigned newFrequency) {m_frequency = newFrequency;} + Q_SLOT void setFrequency (double newFrequency) {m_frequency = newFrequency;} Q_SIGNAL void stateChanged (ModulatorState) const; protected: diff --git a/mainwindow.cpp b/mainwindow.cpp index 974de54a6..d3a6f5170 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -720,7 +720,7 @@ void MainWindow::readSettings() on_nightBands_editingFinished(); ui->tuneBands->setText(m_settings->value("TuneBands","").toString()); on_tuneBands_editingFinished(); - ui->graylineDuration->setText(m_settings->value("GraylineDuration","").toString()); + ui->graylineDuration->setText(m_settings->value("GrayLineDuration","").toString()); on_graylineDuration_editingFinished(); m_settings->endGroup(); @@ -3705,7 +3705,7 @@ void MainWindow::transmit (double snr) if (m_mode=="WSPR-2") { //### Similar code needed for WSPR-15 ### Q_EMIT sendMessage (NUM_WSPR_SYMBOLS, 8192.0, - ui->TxFreqSpinBox->value()-2, m_toneSpacing, + ui->TxFreqSpinBox->value() - 1.5 * 12000 / 8192, m_toneSpacing, &m_soundOutput, m_config.audio_output_channel(), true, snr); } diff --git a/mainwindow.h b/mainwindow.h index ca6c87c90..fb207112d 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -246,11 +246,11 @@ private: Q_SIGNAL void startDetector (AudioDevice::Channel) const; Q_SIGNAL void detectorClose () const; Q_SIGNAL void finished () const; - Q_SIGNAL void transmitFrequency (unsigned) const; + Q_SIGNAL void transmitFrequency (double) const; Q_SIGNAL void endTransmitMessage (bool quick = false) const; Q_SIGNAL void tune (bool = true) const; Q_SIGNAL void sendMessage (unsigned symbolsLength, double framesPerSymbol, - unsigned frequency, double toneSpacing, + double frequency, double toneSpacing, SoundOutput *, AudioDevice::Channel = AudioDevice::Mono, bool synchronize = true, double dBSNR = 99.) const; Q_SIGNAL void outAttenuationChanged (qreal) const;