Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeDV Reporter usability enhancements #519

Merged
merged 22 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,9 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
* Adjust coloring of text and ticks on spectrum plot to improve visibility when in dark mode. (PR #518)
2. Enhancements:
* Add tooltip to Record button to claify its behavior. (PR #511)
* Add highlighting for RX rows in FreeDV Reporter (to match web version). (PR #519)
* Add Distance column in FreeDV Reporter window. (PR #519)
* Add support for sorting columns in FreeDV Reporter window. (PR #519)
3. Cleanup:
* Remove unneeded 2400B and 2020B sample files. (PR #521)

Expand Down
6 changes: 6 additions & 0 deletions src/config/FreeDVConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ FreeDVConfiguration::FreeDVConfiguration()
, reporterWindowWidth("/Windows/FreeDVReporter/width", -1)
, reporterWindowHeight("/Windows/FreeDVReporter/height", -1)
, reporterWindowVisible("/Windows/FreeDVReporter/visible", false)
, reporterWindowCurrentSort("/Windows/FreeDVReporter/currentSort", -1)
, reporterWindowCurrentSortDirection("/Windows/FreeDVReporter/currentSortDirection", true)

/* Current tab view */
, currentNotebookTab("/MainFrame/rxNbookCtrl", 0)
Expand Down Expand Up @@ -130,6 +132,8 @@ void FreeDVConfiguration::load(wxConfigBase* config)
load_(config, reporterWindowWidth);
load_(config, reporterWindowHeight);
load_(config, reporterWindowVisible);
load_(config, reporterWindowCurrentSort);
load_(config, reporterWindowCurrentSortDirection);

load_(config, currentNotebookTab);

Expand Down Expand Up @@ -210,6 +214,8 @@ void FreeDVConfiguration::save(wxConfigBase* config)
save_(config, reporterWindowWidth);
save_(config, reporterWindowHeight);
save_(config, reporterWindowVisible);
save_(config, reporterWindowCurrentSort);
save_(config, reporterWindowCurrentSortDirection);

save_(config, currentNotebookTab);

Expand Down
2 changes: 2 additions & 0 deletions src/config/FreeDVConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class FreeDVConfiguration : public WxWidgetsConfigStore
ConfigurationDataElement<long> reporterWindowWidth;
ConfigurationDataElement<long> reporterWindowHeight;
ConfigurationDataElement<bool> reporterWindowVisible;
ConfigurationDataElement<int> reporterWindowCurrentSort;
ConfigurationDataElement<bool> reporterWindowCurrentSortDirection;

ConfigurationDataElement<long> currentNotebookTab;

Expand Down
5 changes: 4 additions & 1 deletion src/config/ReportingConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ ReportingConfiguration::ReportingConfiguration()
, freedvReporterEnabled("/Reporting/FreeDV/Enable", true)
, freedvReporterHostname("/Reporting/FreeDV/Hostname", wxT(FREEDV_REPORTER_DEFAULT_HOSTNAME))
, freedvReporterBandFilter("/Reporting/FreeDV/CurrentBandFilter", 0)
, useMetricDistances("/Reporting/FreeDV/UseMetricDistances", true)

, useUTCForReporting("/CallsignList/UseUTCTime", false)

Expand Down Expand Up @@ -86,6 +87,7 @@ void ReportingConfiguration::load(wxConfigBase* config)
load_(config, freedvReporterEnabled);
load_(config, freedvReporterHostname);
load_(config, freedvReporterBandFilter);
load_(config, useMetricDistances);

load_(config, useUTCForReporting);

Expand All @@ -111,6 +113,7 @@ void ReportingConfiguration::save(wxConfigBase* config)
save_(config, freedvReporterEnabled);
save_(config, freedvReporterHostname);
save_(config, freedvReporterBandFilter);
save_(config, useMetricDistances);

save_(config, useUTCForReporting);

Expand All @@ -121,4 +124,4 @@ void ReportingConfiguration::save(wxConfigBase* config)
// Special save handling for reporting below.
wxString tempFreqStr = wxString::Format(wxT("%" PRIu64), reportingFrequency.getWithoutProcessing());
config->Write(reportingFrequency.getElementName(), tempFreqStr);
}
}
1 change: 1 addition & 0 deletions src/config/ReportingConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class ReportingConfiguration : public WxWidgetsConfigStore
ConfigurationDataElement<bool> freedvReporterEnabled;
ConfigurationDataElement<wxString> freedvReporterHostname;
ConfigurationDataElement<int> freedvReporterBandFilter;
ConfigurationDataElement<bool> useMetricDistances;

ConfigurationDataElement<bool> useUTCForReporting;

Expand Down
11 changes: 10 additions & 1 deletion src/dlg_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ OptionsDlg::OptionsDlg(wxWindow* parent, wxWindowID id, const wxString& title, c
sessionActive_ = false;

wxPanel* panel = new wxPanel(this);
panel->SetMinSize(wxSize(700, -1));

wxBoxSizer* bSizer30;
bSizer30 = new wxBoxSizer(wxVERTICAL);
Expand Down Expand Up @@ -136,6 +135,9 @@ OptionsDlg::OptionsDlg(wxWindow* parent, wxWindowID id, const wxString& title, c
sbSizerReportingFreeDV->Add(labelFreeDVHostName, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);
sbSizerReportingFreeDV->Add(m_freedvReporterHostname, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);

m_useMetricDistances = new wxCheckBox(m_reportingTab, wxID_ANY, _("Distances in km"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE);
sbSizerReportingFreeDV->Add(m_useMetricDistances, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);

sbSizerReportingRows->Add(sbSizerReportingFreeDV, 0, wxALL | wxEXPAND, 5);

sizerReporting->Add(sbSizerReportingRows, 0, wxALL | wxEXPAND, 5);
Expand Down Expand Up @@ -550,6 +552,7 @@ OptionsDlg::OptionsDlg(wxWindow* parent, wxWindowID id, const wxString& title, c
m_ckboxManualFrequencyReporting->MoveBeforeInTabOrder(m_ckboxPskReporterEnable);
m_ckboxPskReporterEnable->MoveBeforeInTabOrder(m_ckboxFreeDVReporterEnable);
m_ckboxFreeDVReporterEnable->MoveBeforeInTabOrder(m_freedvReporterHostname);
m_freedvReporterHostname->MoveBeforeInTabOrder(m_useMetricDistances);

m_waterfallColorScheme1->MoveBeforeInTabOrder(m_waterfallColorScheme2);
m_waterfallColorScheme2->MoveBeforeInTabOrder(m_waterfallColorScheme3);
Expand Down Expand Up @@ -763,6 +766,7 @@ void OptionsDlg::ExchangeData(int inout, bool storePersistent)
// FreeDV Reporter options
m_ckboxFreeDVReporterEnable->SetValue(wxGetApp().appConfiguration.reportingConfiguration.freedvReporterEnabled);
m_freedvReporterHostname->SetValue(wxGetApp().appConfiguration.reportingConfiguration.freedvReporterHostname);
m_useMetricDistances->SetValue(wxGetApp().appConfiguration.reportingConfiguration.useMetricDistances);

// Callsign list config
m_ckbox_use_utc_time->SetValue(wxGetApp().appConfiguration.reportingConfiguration.useUTCForReporting);
Expand Down Expand Up @@ -896,6 +900,7 @@ void OptionsDlg::ExchangeData(int inout, bool storePersistent)
// FreeDV Reporter options
wxGetApp().appConfiguration.reportingConfiguration.freedvReporterEnabled = m_ckboxFreeDVReporterEnable->GetValue();
wxGetApp().appConfiguration.reportingConfiguration.freedvReporterHostname = m_freedvReporterHostname->GetValue();
wxGetApp().appConfiguration.reportingConfiguration.useMetricDistances = m_useMetricDistances->GetValue();

// Callsign list config
wxGetApp().appConfiguration.reportingConfiguration.useUTCForReporting = m_ckbox_use_utc_time->GetValue();
Expand Down Expand Up @@ -1095,10 +1100,12 @@ void OptionsDlg::updateReportingState()
if (m_ckboxFreeDVReporterEnable->GetValue())
{
m_freedvReporterHostname->Enable(true);
m_useMetricDistances->Enable(true);
}
else
{
m_freedvReporterHostname->Enable(false);
m_useMetricDistances->Enable(false);
}
}
else
Expand All @@ -1110,6 +1117,7 @@ void OptionsDlg::updateReportingState()
m_ckboxFreeDVReporterEnable->Enable(false);
m_freedvReporterHostname->Enable(false);
m_ckboxManualFrequencyReporting->Enable(false);
m_useMetricDistances->Enable(false);
}
}
else
Expand All @@ -1123,6 +1131,7 @@ void OptionsDlg::updateReportingState()
m_ckboxPskReporterEnable->Enable(false);
m_ckboxFreeDVReporterEnable->Enable(false);
m_freedvReporterHostname->Enable(false);
m_useMetricDistances->Enable(false);

m_ckbox_use_utc_time->Enable(false);
}
Expand Down
1 change: 1 addition & 0 deletions src/dlg_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ class OptionsDlg : public wxDialog

wxCheckBox *m_ckboxFreeDVReporterEnable;
wxTextCtrl *m_freedvReporterHostname;
wxCheckBox *m_useMetricDistances;

wxButton* m_BtnFifoReset;
wxStaticText *m_textFifos;
Expand Down
Loading