When operating in JT9+JT65 mode, changing band to 60 m has moved the

"JT65 nnnn JT9" blue line to 0 Hz.  Now it also moves the spinner to
0 Hz, as it should have done.  Subsequent QSY to another band will reset
the blue line and spinner to where they had been, before the QSY to 60 m.
Thanks to W9MDB for this patch.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7595 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-03-03 15:11:32 +00:00
parent dfe8353c1d
commit 220f03c7be
3 changed files with 21 additions and 4 deletions

View File

@ -1755,16 +1755,24 @@ void MainWindow::displayDialFrequency ()
ui->bandComboBox->setCurrentText (band_name); ui->bandComboBox->setCurrentText (band_name);
m_wideGraph->setRxBand (band_name); m_wideGraph->setRxBand (band_name);
m_lastBand = band_name; m_lastBand = band_name;
// For 60M we'll move the JT9 offset to zero // For 60M we'll move the JT9 offset to zero and remember so we can restore
static int saveRxRange = -1; static int saveRxRange = -1;
if (saveRxRange < 0) saveRxRange = m_wideGraph->Fmin(); if (saveRxRange < 0) {
m_settings->beginGroup ("WideGraph");
saveRxRange = m_settings->value ("FminSave", m_wideGraph->Fmin()).toInt ();
m_settings->endGroup();
}
if (band_name == "60m") { if (band_name == "60m") {
saveRxRange = m_wideGraph->Fmin(); saveRxRange = m_wideGraph->Fmin();
m_wideGraph->setRxRange(0); // We need to remember our save value in case we restart on 60M
m_settings->beginGroup ("WideGraph");
m_settings->setValue ("FminSave", saveRxRange);
m_settings->endGroup();
m_wideGraph->setRxRangeAndSplitSpinBox(0);
} }
else { else {
m_wideGraph->setRxRange(saveRxRange); m_wideGraph->setRxRangeAndSplitSpinBox(saveRxRange);
} }
} }

View File

@ -312,6 +312,14 @@ void WideGraph::setRxRange(int fMin) //setRxRange
ui->widePlot->update(); ui->widePlot->update();
} }
void WideGraph::setRxRangeAndSplitSpinBox(int fMin)
{
// Need to ensure split box is set too
// e.g. For 60M we force the offset to 0 so this routine makes the split box match
// Otherwise we can't decode JT9
ui->fSplitSpinBox->setValue(fMin);
}
int WideGraph::Fmin() //Fmin int WideGraph::Fmin() //Fmin
{ {
return m_fMin; return m_fMin;

View File

@ -33,6 +33,7 @@ public:
int fSpan(); int fSpan();
void saveSettings(); void saveSettings();
void setRxRange(int fMin); void setRxRange(int fMin);
void setRxRangeAndSplitSpinBox(int fMin);
void setFsample(int n); void setFsample(int n);
void setPeriod(int ntrperiod, int nsps); void setPeriod(int ntrperiod, int nsps);
void setTxFreq(int n); void setTxFreq(int n);