mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Use the settings frequency list as a source for cal frequencies
Some default time signals have been added to the frequency list so a base set can be obtained by resetting the frequency list, alternatively they can be added ad hoc in the normal fashion. FreqCal mode behavior is to select the lowest cal frequency upon entering FreqCal mode and cycling through each cal frequency repeatedly. Ctrl+F10 jumps directly to the next higher frequency. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7463 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
92cd8d9959
commit
ea507b6ec8
@ -32,26 +32,37 @@ namespace
|
||||
{474200, Modes::JT65},
|
||||
{474200, Modes::JT9},
|
||||
{474200, Modes::WSPR},
|
||||
{660000, Modes::FreqCal},
|
||||
{880000, Modes::FreqCal},
|
||||
{1210000, Modes::FreqCal},
|
||||
{1836600, Modes::WSPR},
|
||||
{1838000, Modes::JT65},
|
||||
{1840000, Modes::JT9},
|
||||
{2500000, Modes::FreqCal},
|
||||
{3330000, Modes::FreqCal},
|
||||
{3576000, Modes::JT65},
|
||||
{3578000, Modes::JT9},
|
||||
{3592600, Modes::WSPR},
|
||||
{5357000, Modes::JT65},
|
||||
{5000000, Modes::FreqCal},
|
||||
{5287200, Modes::WSPR},
|
||||
{7038600, Modes::WSPR},
|
||||
{7076000, Modes::JT65},
|
||||
{7078000, Modes::JT9},
|
||||
{7850000, Modes::FreqCal},
|
||||
{10000000, Modes::FreqCal},
|
||||
{10138000, Modes::JT65},
|
||||
{10138700, Modes::WSPR},
|
||||
{10140000, Modes::JT9},
|
||||
{14095600, Modes::WSPR},
|
||||
{14076000, Modes::JT65},
|
||||
{14078000, Modes::JT9},
|
||||
{14670000, Modes::FreqCal},
|
||||
{15000000, Modes::FreqCal},
|
||||
{18102000, Modes::JT65},
|
||||
{18104000, Modes::JT9},
|
||||
{18104600, Modes::WSPR},
|
||||
{20000000, Modes::FreqCal},
|
||||
{21076000, Modes::JT65},
|
||||
{21078000, Modes::JT9},
|
||||
{21094600, Modes::WSPR},
|
||||
@ -573,16 +584,26 @@ QMimeData * FrequencyList::impl::mimeData (QModelIndexList const& items) const
|
||||
return mime_data;
|
||||
}
|
||||
|
||||
auto FrequencyList::const_iterator::operator * () -> Item const&
|
||||
auto FrequencyList::const_iterator::operator * () const -> Item const&
|
||||
{
|
||||
return parent_->frequency_list ().at(parent_->mapToSource (parent_->index (row_, 0)).row ());
|
||||
}
|
||||
|
||||
auto FrequencyList::const_iterator::operator -> () const -> Item const *
|
||||
{
|
||||
return &parent_->frequency_list ().at(parent_->mapToSource (parent_->index (row_, 0)).row ());
|
||||
}
|
||||
|
||||
bool FrequencyList::const_iterator::operator != (const_iterator const& rhs) const
|
||||
{
|
||||
return parent_ != rhs.parent_ || row_ != rhs.row_;
|
||||
}
|
||||
|
||||
bool FrequencyList::const_iterator::operator == (const_iterator const& rhs) const
|
||||
{
|
||||
return parent_ == rhs.parent_ && row_ == rhs.row_;
|
||||
}
|
||||
|
||||
auto FrequencyList::const_iterator::operator ++ () -> const_iterator&
|
||||
{
|
||||
++row_;
|
||||
|
@ -64,8 +64,10 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
Item const& operator * ();
|
||||
Item const& operator * () const;
|
||||
Item const * operator -> () const;
|
||||
bool operator != (const_iterator const&) const;
|
||||
bool operator == (const_iterator const&) const;
|
||||
const_iterator& operator ++ ();
|
||||
|
||||
private:
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include "Radio.hpp"
|
||||
#include "Bands.hpp"
|
||||
#include "TransceiverFactory.hpp"
|
||||
#include "FrequencyList.hpp"
|
||||
#include "StationList.hpp"
|
||||
#include "LiveFrequencyValidator.hpp"
|
||||
#include "MessageClient.hpp"
|
||||
@ -220,6 +219,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
m_nWSPRdecodes {0},
|
||||
m_k0 {9999999},
|
||||
m_nPick {0},
|
||||
m_current_frequency_list_iter {m_config.frequencies ()->end ()},
|
||||
m_TRperiodFast {-1},
|
||||
m_nTx73 {0},
|
||||
m_btxok {false},
|
||||
@ -4546,6 +4546,7 @@ void MainWindow::on_actionFreqCal_triggered()
|
||||
m_mode="FreqCal";
|
||||
ui->actionFreqCal->setChecked(true);
|
||||
switch_mode(Modes::FreqCal);
|
||||
m_current_frequency_list_iter = m_config.frequencies ()->begin ();
|
||||
m_wideGraph->setMode(m_mode);
|
||||
statusChanged();
|
||||
m_TRperiod=30;
|
||||
@ -4560,6 +4561,7 @@ void MainWindow::on_actionFreqCal_triggered()
|
||||
setup_status_bar (true);
|
||||
// 18:15:47 0 1 1500 1550.349 0.100 3.5 10.2
|
||||
ui->decodedTextLabel->setText(" UTC Freq CAL Offset fMeas DF Level S/N");
|
||||
on_actionFrequency_calibration_triggered ();
|
||||
}
|
||||
|
||||
void MainWindow::switch_mode (Mode mode)
|
||||
@ -6096,12 +6098,15 @@ void MainWindow::on_actionErase_reference_spectrum_triggered()
|
||||
|
||||
void MainWindow::on_actionFrequency_calibration_triggered()
|
||||
{
|
||||
static int n=-1;
|
||||
double fMHz[]={0.660,0.880,1.210,2.500,3.330,5.000,
|
||||
7.850,10.000,14.670,15.000,20.000};
|
||||
m_freqNominal=1000000.0*fMHz[++n] - m_RxFreq + 0.5;
|
||||
if(n>=10) n=-1;
|
||||
on_bandComboBox_activated(-1);
|
||||
if (m_current_frequency_list_iter != m_config.frequencies ()->end ())
|
||||
{
|
||||
setRig (m_current_frequency_list_iter->frequency_ - m_RxFreq + 0.5);
|
||||
if (++m_current_frequency_list_iter == m_config.frequencies ()->end ())
|
||||
{
|
||||
// loop back to beginning
|
||||
m_current_frequency_list_iter = m_config.frequencies ()->begin ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_sbCQTxFreq_valueChanged(int)
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "commons.h"
|
||||
#include "Radio.hpp"
|
||||
#include "Modes.hpp"
|
||||
#include "FrequencyList.hpp"
|
||||
#include "Configuration.hpp"
|
||||
#include "WSPRBandHopping.hpp"
|
||||
#include "Transceiver.hpp"
|
||||
@ -378,6 +379,7 @@ private:
|
||||
qint32 m_FtolIndex;
|
||||
qint32 m_Ftol;
|
||||
qint32 m_RxFreq;
|
||||
FrequencyList::const_iterator m_current_frequency_list_iter;
|
||||
qint32 m_TRperiodFast;
|
||||
qint32 m_nTx73;
|
||||
qint32 m_UTCdisk;
|
||||
|
Loading…
Reference in New Issue
Block a user