mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-27 14:48:46 -05:00
Clean up HRD information file format
Merged from wsjtx-1.4 branch. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4514 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
9cee2342a2
commit
69b2eac75a
@ -224,28 +224,34 @@ void HRDTransceiver::do_start ()
|
|||||||
HRD_info << "Buttons: {" << buttons_.join (", ") << "}\n";
|
HRD_info << "Buttons: {" << buttons_.join (", ") << "}\n";
|
||||||
|
|
||||||
dropdown_names_ = send_command ("get dropdowns").trimmed ().split (',', QString::SkipEmptyParts);
|
dropdown_names_ = send_command ("get dropdowns").trimmed ().split (',', QString::SkipEmptyParts);
|
||||||
|
#if WSJT_TRACE_CAT
|
||||||
|
qDebug () << "Dropdowns:\n";
|
||||||
|
#endif
|
||||||
HRD_info << "Dropdowns:\n";
|
HRD_info << "Dropdowns:\n";
|
||||||
Q_FOREACH (auto const& dd, dropdown_names_)
|
Q_FOREACH (auto const& dd, dropdown_names_)
|
||||||
{
|
{
|
||||||
auto selections = send_command ("get dropdown-list {" + dd + "}").trimmed ().split (',', QString::SkipEmptyParts);
|
auto selections = send_command ("get dropdown-list {" + dd + "}").trimmed ().split (',', QString::SkipEmptyParts);
|
||||||
|
#if WSJT_TRACE_CAT
|
||||||
|
qDebug () << "\t" << dd << ": {" << selections.join (", ") << "}\n";
|
||||||
|
#endif
|
||||||
HRD_info << "\t" << dd << ": {" << selections.join (", ") << "}\n";
|
HRD_info << "\t" << dd << ": {" << selections.join (", ") << "}\n";
|
||||||
dropdowns_[dd] = selections;
|
dropdowns_[dd] = selections;
|
||||||
}
|
}
|
||||||
#if WSJT_TRACE_CAT
|
|
||||||
qDebug () << "HRD Dropdowns: " << dropdowns_;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
sliders_ = send_command ("get sliders").trimmed ().split (',', QString::SkipEmptyParts).replaceInStrings (" ", "~");
|
slider_names_ = send_command ("get sliders").trimmed ().split (',', QString::SkipEmptyParts).replaceInStrings (" ", "~");
|
||||||
|
#if WSJT_TRACE_CAT
|
||||||
|
qDebug () << "Sliders:\n";
|
||||||
|
#endif
|
||||||
HRD_info << "Sliders:\n";
|
HRD_info << "Sliders:\n";
|
||||||
HRD_info << "Sliders: {" << sliders_.join (", ") << "}\n";
|
Q_FOREACH (auto const& s, slider_names_)
|
||||||
Q_FOREACH (auto const& s, sliders_)
|
|
||||||
{
|
{
|
||||||
auto range = send_command ("get slider-range " + current_radio_name + " " + s).trimmed ().split (',', QString::SkipEmptyParts);
|
auto range = send_command ("get slider-range " + current_radio_name + " " + s).trimmed ().split (',', QString::SkipEmptyParts);
|
||||||
HRD_info << "\t" << s << ": {" << range.join (", ") << "}\n";
|
|
||||||
}
|
|
||||||
#if WSJT_TRACE_CAT
|
#if WSJT_TRACE_CAT
|
||||||
qDebug () << "HRD Dropdowns: " << dropdowns_;
|
qDebug () << "\t" << s << ": {" << range.join (", ") << "}\n";
|
||||||
#endif
|
#endif
|
||||||
|
HRD_info << "\t" << s << ": {" << range.join (", ") << "}\n";
|
||||||
|
sliders_[s] = range;
|
||||||
|
}
|
||||||
|
|
||||||
vfo_A_button_ = find_button (QRegExp ("^(VFO~A|Main)$"));
|
vfo_A_button_ = find_button (QRegExp ("^(VFO~A|Main)$"));
|
||||||
vfo_B_button_ = find_button (QRegExp ("^(VFO~B|Sub)$"));
|
vfo_B_button_ = find_button (QRegExp ("^(VFO~B|Sub)$"));
|
||||||
|
@ -104,10 +104,12 @@ private:
|
|||||||
// available.
|
// available.
|
||||||
|
|
||||||
QMap<QString, QStringList> dropdowns_; // Dictionary of available
|
QMap<QString, QStringList> dropdowns_; // Dictionary of available
|
||||||
// drop down selections
|
// drop down selections.
|
||||||
// available.
|
|
||||||
|
|
||||||
QStringList sliders_; // The sliders available.
|
QStringList slider_names_; // The name of available sliders.
|
||||||
|
|
||||||
|
QMap<QString, QStringList> sliders_; // Dictionary of available
|
||||||
|
// slider ranges.
|
||||||
|
|
||||||
int vfo_A_button_; // The button we use to select VFO
|
int vfo_A_button_; // The button we use to select VFO
|
||||||
// A. May be -1 if none available.
|
// A. May be -1 if none available.
|
||||||
|
Loading…
Reference in New Issue
Block a user