Merge branch 'master' into ms-filter-exact-freq

pull/596/head
Mooneer Salem 2023-11-02 11:23:30 -07:00
commit e14f13dff3
4 changed files with 20 additions and 2 deletions

View File

@ -657,6 +657,7 @@ FMA - Supports FMA extensions using YMM state</code></pre>
<ul>
<li>Fix bug preventing frequency updates from being properly suppressed when frequency control is in focus. (PR #585)</li>
<li>Fix bug preventing 60 meter frequencies from using USB with DIGU/DIGL disabled. (PR #589)</li>
<li>Add entitlements to work around macOS Sonoma permissions bug. (PR #598)</li>
<li>Fix bug preventing FreeDV Reporter window from closing after resetting configuration to defaults. (PR #593)</li>
</ul></li>
<li>Enhancements:

View File

@ -917,6 +917,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
1. Bugfixes:
* Fix bug preventing frequency updates from being properly suppressed when frequency control is in focus. (PR #585)
* Fix bug preventing 60 meter frequencies from using USB with DIGU/DIGL disabled. (PR #589)
* Additional fix for PR #561 to parse/format frequencies using current locale. (PR #595)
* Add entitlements to work around macOS Sonoma permissions bug. (PR #598)
* Fix bug preventing FreeDV Reporter window from closing after resetting configuration to defaults. (PR #593)
2. Enhancements:

Binary file not shown.

View File

@ -4,6 +4,10 @@
The simpler GUI event handlers.
*/
#include <sstream>
#include <iomanip>
#include <locale>
#include "main.h"
#include "lpcnet_freedv.h"
@ -419,7 +423,12 @@ bool MainFrame::OpenHamlibRig() {
!wxGetApp().appConfiguration.reportingConfiguration.reportingEnabled ||
!wxGetApp().appConfiguration.reportingConfiguration.manualFrequencyReporting))
{
m_cboReportFrequency->SetValue(wxString::Format("%.4f", freq/1000.0/1000.0));
// wxString::Format() doesn't respect locale but C++ iomanip should. Use the latter instead.
std::stringstream ss;
std::locale loc("");
ss.imbue(loc);
ss << std::fixed << std::setprecision(4) << (freq / 1000.0 / 1000.0);
m_cboReportFrequency->SetValue(ss.str());
}
m_txtModeStatus->Refresh();
});
@ -995,7 +1004,14 @@ void MainFrame::OnChangeReportFrequency( wxCommandEvent& event )
if (freqStr.Length() > 0)
{
wxGetApp().appConfiguration.reportingConfiguration.reportingFrequency = round(atof(freqStr.ToUTF8()) * 1000 * 1000);
double tmp = 0;
std::stringstream ss(std::string(freqStr.ToUTF8()));
std::locale loc("");
ss.imbue(loc);
ss >> std::fixed >> std::setprecision(4) >> tmp;
wxGetApp().appConfiguration.reportingConfiguration.reportingFrequency = round(tmp * 1000 * 1000);
if (wxGetApp().appConfiguration.reportingConfiguration.reportingFrequency > 0)
{
m_cboReportFrequency->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));