Only report RADE RX once a second to the server.
parent
f62345538e
commit
31efc56bb0
|
@ -228,6 +228,7 @@ bool MainApp::OnInit()
|
|||
m_locale.Init();
|
||||
|
||||
m_reporters.clear();
|
||||
m_reportCounter = 0;
|
||||
|
||||
if(!wxApp::OnInit())
|
||||
{
|
||||
|
@ -1648,8 +1649,10 @@ void MainFrame::OnTimer(wxTimerEvent &evt)
|
|||
|
||||
// Only report if there's a valid reporting frequency and if we're not playing
|
||||
// a recording through ourselves (to avoid false reports).
|
||||
if (freq > 0)
|
||||
wxGetApp().m_reportCounter = (wxGetApp().m_reportCounter + 1) % 10;
|
||||
if (freq > 0 && wxGetApp().m_reportCounter == 0)
|
||||
{
|
||||
wxGetApp().m_reportCounter = 0;
|
||||
if (!g_playFileFromRadio)
|
||||
{
|
||||
wxGetApp().m_sharedReporterObject->addReceiveRecord(
|
||||
|
|
|
@ -222,6 +222,8 @@ class MainApp : public wxApp
|
|||
std::shared_ptr<LinkStep> linkStep;
|
||||
|
||||
wxLocale m_locale;
|
||||
|
||||
int m_reportCounter;
|
||||
protected:
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue