From a114b8c9ea6e583d143ef43ab0f28e668a85f33b Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 8 Aug 2013 14:26:53 +0000 Subject: [PATCH] 1. Capitalize names of palettes appropriately. 2. Remove (or comment out) most qDebug() statements. 3. Swap positions of labels 2 and 3 on status bar. 4. In "Split Tx" mode, transmit audio always between 1500 and 2000 Hz. 5. Rearrange positions of WideGraph controls. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3535 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- Modulator.cpp | 5 +- Palettes/{banana.pal => Banana.pal} | 0 Palettes/{blue1.pal => Blue1.pal} | 0 Palettes/{blue2.pal => Blue2.pal} | 0 Palettes/{blue3.pal => Blue3.pal} | 0 Palettes/{brown.pal => Brown.pal} | 0 Palettes/{cyan1.pal => Cyan1.pal} | 0 Palettes/{cyan2.pal => Cyan2.pal} | 0 Palettes/{cyan3.pal => Cyan3.pal} | 0 Palettes/{default.pal => Default.pal} | 0 Palettes/{digipan.pal => Digipan.pal} | 0 Palettes/{fldigi.pal => Fldigi.pal} | 0 Palettes/{gmfsk.pal => Gmfsk.pal} | 0 Palettes/{gray1.pal => Gray1.pal} | 0 Palettes/{gray2.pal => Gray2.pal} | 0 Palettes/{green1.pal => Green1.pal} | 0 Palettes/{green2.pal => Green2.pal} | 0 Palettes/{jungle.pal => Jungle.pal} | 0 Palettes/{linrad.pal => Linrad.pal} | 0 Palettes/{negative.pal => Negative.pal} | 0 Palettes/{orange.pal => Orange.pal} | 0 Palettes/{pink.pal => Pink.pal} | 0 Palettes/{rainbow.pal => Rainbow.pal} | 0 Palettes/{scope.pal => Scope.pal} | 0 Palettes/{sunburst.pal => Sunburst.pal} | 0 Palettes/{vk4bdj.pal => VK4BDJ.pal} | 0 Palettes/{yl2kf.pal => YL2KF.pal} | 0 Palettes/{yellow1.pal => Yellow1.pal} | 0 Palettes/{yellow2.pal => Yellow2.pal} | 0 Palettes/{zl2fz.pal => ZL2FZ.pal} | 0 logbook/logbook.cpp | 3 +- mainwindow.cpp | 25 +-- soundin.cpp | 10 - soundout.cpp | 6 - widegraph.ui | 256 +++++++++++++----------- 35 files changed, 154 insertions(+), 151 deletions(-) rename Palettes/{banana.pal => Banana.pal} (100%) rename Palettes/{blue1.pal => Blue1.pal} (100%) rename Palettes/{blue2.pal => Blue2.pal} (100%) rename Palettes/{blue3.pal => Blue3.pal} (100%) rename Palettes/{brown.pal => Brown.pal} (100%) rename Palettes/{cyan1.pal => Cyan1.pal} (100%) rename Palettes/{cyan2.pal => Cyan2.pal} (100%) rename Palettes/{cyan3.pal => Cyan3.pal} (100%) rename Palettes/{default.pal => Default.pal} (100%) rename Palettes/{digipan.pal => Digipan.pal} (100%) rename Palettes/{fldigi.pal => Fldigi.pal} (100%) rename Palettes/{gmfsk.pal => Gmfsk.pal} (100%) rename Palettes/{gray1.pal => Gray1.pal} (100%) rename Palettes/{gray2.pal => Gray2.pal} (100%) rename Palettes/{green1.pal => Green1.pal} (100%) rename Palettes/{green2.pal => Green2.pal} (100%) rename Palettes/{jungle.pal => Jungle.pal} (100%) rename Palettes/{linrad.pal => Linrad.pal} (100%) rename Palettes/{negative.pal => Negative.pal} (100%) rename Palettes/{orange.pal => Orange.pal} (100%) rename Palettes/{pink.pal => Pink.pal} (100%) rename Palettes/{rainbow.pal => Rainbow.pal} (100%) rename Palettes/{scope.pal => Scope.pal} (100%) rename Palettes/{sunburst.pal => Sunburst.pal} (100%) rename Palettes/{vk4bdj.pal => VK4BDJ.pal} (100%) rename Palettes/{yl2kf.pal => YL2KF.pal} (100%) rename Palettes/{yellow1.pal => Yellow1.pal} (100%) rename Palettes/{yellow2.pal => Yellow2.pal} (100%) rename Palettes/{zl2fz.pal => ZL2FZ.pal} (100%) diff --git a/Modulator.cpp b/Modulator.cpp index 30cbcf867..24f96bf59 100644 --- a/Modulator.cpp +++ b/Modulator.cpp @@ -66,8 +66,7 @@ void Modulator::send (unsigned symbolsLength, double framesPerSymbol, unsigned f m_silentFrames = m_ic + m_frameRate - (mstr * m_frameRate / 1000); } - qDebug () << "Modulator: starting at " << m_ic / m_frameRate << " sec, sending " << m_silentFrames << " silent frames"; - +// qDebug () << "Modulator: starting at " << m_ic / m_frameRate << " sec, sending " << m_silentFrames << " silent frames"; Q_EMIT stateChanged ((m_state = (synchronize && m_silentFrames) ? Synchronizing : Active)); } @@ -79,7 +78,7 @@ qint64 Modulator::readData (char * data, qint64 maxSize) frame_t * frames (reinterpret_cast (data)); qint64 numFrames (maxSize / sizeof (frame_t)); - qDebug () << "Modulator: " << numFrames << " requested, m_ic = " << m_ic << ", tune mode is " << m_tuning; +// qDebug () << "Modulator: " << numFrames << " requested, m_ic = " << m_ic << ", tune mode is " << m_tuning; switch (m_state) { diff --git a/Palettes/banana.pal b/Palettes/Banana.pal similarity index 100% rename from Palettes/banana.pal rename to Palettes/Banana.pal diff --git a/Palettes/blue1.pal b/Palettes/Blue1.pal similarity index 100% rename from Palettes/blue1.pal rename to Palettes/Blue1.pal diff --git a/Palettes/blue2.pal b/Palettes/Blue2.pal similarity index 100% rename from Palettes/blue2.pal rename to Palettes/Blue2.pal diff --git a/Palettes/blue3.pal b/Palettes/Blue3.pal similarity index 100% rename from Palettes/blue3.pal rename to Palettes/Blue3.pal diff --git a/Palettes/brown.pal b/Palettes/Brown.pal similarity index 100% rename from Palettes/brown.pal rename to Palettes/Brown.pal diff --git a/Palettes/cyan1.pal b/Palettes/Cyan1.pal similarity index 100% rename from Palettes/cyan1.pal rename to Palettes/Cyan1.pal diff --git a/Palettes/cyan2.pal b/Palettes/Cyan2.pal similarity index 100% rename from Palettes/cyan2.pal rename to Palettes/Cyan2.pal diff --git a/Palettes/cyan3.pal b/Palettes/Cyan3.pal similarity index 100% rename from Palettes/cyan3.pal rename to Palettes/Cyan3.pal diff --git a/Palettes/default.pal b/Palettes/Default.pal similarity index 100% rename from Palettes/default.pal rename to Palettes/Default.pal diff --git a/Palettes/digipan.pal b/Palettes/Digipan.pal similarity index 100% rename from Palettes/digipan.pal rename to Palettes/Digipan.pal diff --git a/Palettes/fldigi.pal b/Palettes/Fldigi.pal similarity index 100% rename from Palettes/fldigi.pal rename to Palettes/Fldigi.pal diff --git a/Palettes/gmfsk.pal b/Palettes/Gmfsk.pal similarity index 100% rename from Palettes/gmfsk.pal rename to Palettes/Gmfsk.pal diff --git a/Palettes/gray1.pal b/Palettes/Gray1.pal similarity index 100% rename from Palettes/gray1.pal rename to Palettes/Gray1.pal diff --git a/Palettes/gray2.pal b/Palettes/Gray2.pal similarity index 100% rename from Palettes/gray2.pal rename to Palettes/Gray2.pal diff --git a/Palettes/green1.pal b/Palettes/Green1.pal similarity index 100% rename from Palettes/green1.pal rename to Palettes/Green1.pal diff --git a/Palettes/green2.pal b/Palettes/Green2.pal similarity index 100% rename from Palettes/green2.pal rename to Palettes/Green2.pal diff --git a/Palettes/jungle.pal b/Palettes/Jungle.pal similarity index 100% rename from Palettes/jungle.pal rename to Palettes/Jungle.pal diff --git a/Palettes/linrad.pal b/Palettes/Linrad.pal similarity index 100% rename from Palettes/linrad.pal rename to Palettes/Linrad.pal diff --git a/Palettes/negative.pal b/Palettes/Negative.pal similarity index 100% rename from Palettes/negative.pal rename to Palettes/Negative.pal diff --git a/Palettes/orange.pal b/Palettes/Orange.pal similarity index 100% rename from Palettes/orange.pal rename to Palettes/Orange.pal diff --git a/Palettes/pink.pal b/Palettes/Pink.pal similarity index 100% rename from Palettes/pink.pal rename to Palettes/Pink.pal diff --git a/Palettes/rainbow.pal b/Palettes/Rainbow.pal similarity index 100% rename from Palettes/rainbow.pal rename to Palettes/Rainbow.pal diff --git a/Palettes/scope.pal b/Palettes/Scope.pal similarity index 100% rename from Palettes/scope.pal rename to Palettes/Scope.pal diff --git a/Palettes/sunburst.pal b/Palettes/Sunburst.pal similarity index 100% rename from Palettes/sunburst.pal rename to Palettes/Sunburst.pal diff --git a/Palettes/vk4bdj.pal b/Palettes/VK4BDJ.pal similarity index 100% rename from Palettes/vk4bdj.pal rename to Palettes/VK4BDJ.pal diff --git a/Palettes/yl2kf.pal b/Palettes/YL2KF.pal similarity index 100% rename from Palettes/yl2kf.pal rename to Palettes/YL2KF.pal diff --git a/Palettes/yellow1.pal b/Palettes/Yellow1.pal similarity index 100% rename from Palettes/yellow1.pal rename to Palettes/Yellow1.pal diff --git a/Palettes/yellow2.pal b/Palettes/Yellow2.pal similarity index 100% rename from Palettes/yellow2.pal rename to Palettes/Yellow2.pal diff --git a/Palettes/zl2fz.pal b/Palettes/ZL2FZ.pal similarity index 100% rename from Palettes/zl2fz.pal rename to Palettes/ZL2FZ.pal diff --git a/logbook/logbook.cpp b/logbook/logbook.cpp index 90ff8552e..b627b9dae 100644 --- a/logbook/logbook.cpp +++ b/logbook/logbook.cpp @@ -16,10 +16,11 @@ void LogBook::init() _setAlreadyWorkedFromLog(); - +/* int QSOcount = _log.getCount(); int count = _worked.getWorkedCount(); qDebug() << QSOcount << "QSOs and" << count << "countries worked in file" << logFilename; +*/ } diff --git a/mainwindow.cpp b/mainwindow.cpp index 9c8d62579..06de5031f 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1027,15 +1027,16 @@ void MainWindow::createStatusBar() //createStatusBar lab1->setFrameStyle(QFrame::Panel | QFrame::Sunken); statusBar()->addWidget(lab1); + lab2 = new QLabel(""); lab2->setAlignment(Qt::AlignHCenter); - lab2->setMinimumSize(QSize(150,18)); + lab2->setMinimumSize(QSize(80,18)); lab2->setFrameStyle(QFrame::Panel | QFrame::Sunken); statusBar()->addWidget(lab2); lab3 = new QLabel(""); lab3->setAlignment(Qt::AlignHCenter); - lab3->setMinimumSize(QSize(80,18)); + lab3->setMinimumSize(QSize(150,18)); lab3->setFrameStyle(QFrame::Panel | QFrame::Sunken); statusBar()->addWidget(lab3); } @@ -1672,7 +1673,7 @@ void MainWindow::guiUpdate() msgsent[22]=0; QString t=QString::fromLatin1(msgsent); if(m_tune) t="TUNE"; - lab2->setText("Last Tx: " + t); + lab3->setText("Last Tx: " + t); if(m_restart) { QFile f("ALL.TXT"); f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append); @@ -2506,8 +2507,8 @@ void MainWindow::on_actionJT9_1_triggered() m_TRperiod=60; m_nsps=6912; m_hsymStop=173; - lab3->setStyleSheet("QLabel{background-color: #ff6ec7}"); - lab3->setText(m_mode); + lab2->setStyleSheet("QLabel{background-color: #ff6ec7}"); + lab2->setText(m_mode); ui->actionJT9_1->setChecked(true); g_pWideGraph->setPeriod(m_TRperiod,m_nsps); g_pWideGraph->setMode(m_mode); @@ -2523,8 +2524,8 @@ void MainWindow::on_actionJT65_triggered() m_TRperiod=60; m_nsps=6912; //For symspec only m_hsymStop=173; - lab3->setStyleSheet("QLabel{background-color: #ffff00}"); - lab3->setText(m_mode); + lab2->setStyleSheet("QLabel{background-color: #ffff00}"); + lab2->setText(m_mode); ui->actionJT65->setChecked(true); g_pWideGraph->setPeriod(m_TRperiod,m_nsps); g_pWideGraph->setMode(m_mode); @@ -2540,8 +2541,8 @@ void MainWindow::on_actionJT9_JT65_triggered() m_TRperiod=60; m_nsps=6912; m_hsymStop=173; - lab3->setStyleSheet("QLabel{background-color: #ffa500}"); - lab3->setText(m_mode); + lab2->setStyleSheet("QLabel{background-color: #ffa500}"); + lab2->setText(m_mode); ui->actionJT9_JT65->setChecked(true); g_pWideGraph->setPeriod(m_TRperiod,m_nsps); g_pWideGraph->setMode(m_mode); @@ -3011,11 +3012,7 @@ void MainWindow::setXIT(int n) int ret; m_XIT = 0; if(m_bRigOpen) { - m_XIT=-1000; - if(n>1000) m_XIT=0; - if(n>2000) m_XIT=1000; - if(n>3000) m_XIT=2000; - if(n>4000) m_XIT=3000; + m_XIT=(n/500)*500 - 1500; if(m_bXIT) { ret=rig->setXit((shortfreq_t)m_XIT,RIG_VFO_TX); if(ret!=RIG_OK) { diff --git a/soundin.cpp b/soundin.cpp index 7ab72b6c0..327e658b8 100644 --- a/soundin.cpp +++ b/soundin.cpp @@ -69,13 +69,8 @@ bool SoundInput::start(QAudioDeviceInfo const& device, int framesPerBuffer, QIOD } connect (m_stream.data(), &QAudioInput::stateChanged, this, &SoundInput::handleStateChanged); - m_stream->setBufferSize (m_stream->format ().bytesForFrames (framesPerBuffer)); - m_stream->start (sink); - - qDebug () << "audio input buffer size = " << m_stream->bufferSize () << " bytes"; - return audioError () ? false : true; } @@ -84,29 +79,24 @@ void SoundInput::handleStateChanged (QAudio::State newState) const switch (newState) { case QAudio::IdleState: - qDebug () << "SoundInput idle"; Q_EMIT status (tr ("Idle")); break; case QAudio::ActiveState: - qDebug () << "SoundInput active"; Q_EMIT status (tr ("Receiving")); break; case QAudio::SuspendedState: - qDebug () << "SoundInput suspended"; Q_EMIT status (tr ("Suspended")); break; case QAudio::StoppedState: if (audioError ()) { - qDebug () << "SoundInput error"; Q_EMIT status (tr ("Error")); } else { - qDebug () << "SoundInput stopped"; Q_EMIT status (tr ("Stopped")); } break; diff --git a/soundout.cpp b/soundout.cpp index d1f1bd7a8..a92f17bd2 100644 --- a/soundout.cpp +++ b/soundout.cpp @@ -101,8 +101,6 @@ void SoundOutput::startStream (QAudioDeviceInfo const& device) m_stream->setBufferSize (m_stream->format ().bytesForDuration (MS_BUFFERED * 1000)); m_stream->start (m_source); audioError (); - - qDebug () << "audio output buffer size = " << m_stream->bufferSize () << " bytes"; } void SoundOutput::suspend () @@ -137,25 +135,21 @@ void SoundOutput::handleStateChanged (QAudio::State newState) switch (newState) { case QAudio::IdleState: - qDebug () << "SoundOutput: entered Idle state"; Q_EMIT status (tr ("Idle")); m_active = false; break; case QAudio::ActiveState: - qDebug () << "SoundOutput: entered Active state"; m_active = true; Q_EMIT status (tr ("Sending")); break; case QAudio::SuspendedState: - qDebug () << "SoundOutput: entered Suspended state"; m_active = true; Q_EMIT status (tr ("Suspended")); break; case QAudio::StoppedState: - qDebug () << "SoundOutput: entered Stopped state"; m_active = false; if (audioError ()) { diff --git a/widegraph.ui b/widegraph.ui index 506521760..e8c2128d5 100644 --- a/widegraph.ui +++ b/widegraph.ui @@ -52,92 +52,17 @@ - - - - Qt::Horizontal + + + + Palette - - - 40 - 20 - + + Qt::AlignCenter - + - - - - 0 - 0 - - - - - 80 - 0 - - - - - 38 - 16777215 - - - - Number of FFTs averaged (controls waterfall scrolling rate) - - - N Avg - - - 1 - - - 20 - - - - - - - - 80 - 0 - - - - Slope - - - 1 - - - -2.000000000000000 - - - 2.000000000000000 - - - 0.100000000000000 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - @@ -168,6 +93,60 @@ + + + + + 80 + 0 + + + + + 38 + 16777215 + + + + Scaling (dB) applied to spectra before plotting + + + Gain + + + -20 + + + 20 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -276,7 +255,85 @@ + + + + + 0 + 0 + + + + + 80 + 0 + + + + Select waterfall palette + + + + + + + 80 + 0 + + + + Slope + + + 1 + + + -2.000000000000000 + + + 2.000000000000000 + + + 0.100000000000000 + + + + + + + + 0 + 0 + + + + + 80 + 0 + + + + + 38 + 16777215 + + + + Number of FFTs averaged (controls waterfall scrolling rate) + + + N Avg + + + 1 + + + 20 + + + + Select data for display curve @@ -296,41 +353,6 @@ - - - - Select waterfall palette - - - - - - - - 80 - 0 - - - - - 38 - 16777215 - - - - Scaling (dB) applied to spectra before plotting - - - Gain - - - -20 - - - 20 - - -