Only show whole number SNRs in main window. (#832)

pull/835/head
Mooneer Salem 2025-02-18 13:02:00 -08:00 committed by GitHub
parent 9fc9403479
commit c642f9d39f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -1696,7 +1696,7 @@ void MainFrame::OnTimer(wxTimerEvent &evt)
if (snr_limited < -5.0) snr_limited = -5.0;
if (snr_limited > 40.0) snr_limited = 40.0;
char snr[15];
snprintf(snr, 15, "%4.1f dB", g_snr);
snprintf(snr, 15, "%4.0f dB", g_snr);
if (freedvInterface.getSync())
{

View File

@ -431,7 +431,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
//------------------------------
// Box for S/N ratio (Numeric)
//------------------------------
m_textSNR = new wxStaticText(snrBox, wxID_ANY, wxT(" 0.0 dB"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE);
m_textSNR = new wxStaticText(snrBox, wxID_ANY, wxT("--"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE);
m_textSNR->SetMinSize(wxSize(70,-1));
snrSizer->Add(m_textSNR, 0, wxALIGN_CENTER_HORIZONTAL, 1);