Merge pull request #769 from drowe67/ms-report-rade

Report RX of RADE signals without callsign or SNR.
pull/771/head
Mooneer Salem 2024-11-12 08:51:51 -08:00 committed by GitHub
commit 8dd540c7b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 30 additions and 1 deletions

View File

@ -7,7 +7,7 @@
#define FREEDV_VERSION_SUFFIX @FreeDV_VERSION_TWEAK@
#if defined(FREEDV_VERSION_TAG)
#define FREEDV_VERSION ("@FreeDV_VERSION@-" FREEDV_VERSION_TAG)
#define FREEDV_VERSION ("@FreeDV_VERSION@-" FREEDV_VERSION_TAG "-" GIT_HASH)
#else
#define FREEDV_VERSION ("@FreeDV_VERSION@")
#endif // defined(FREEDV_VERSION_TAG)

View File

@ -228,6 +228,7 @@ bool MainApp::OnInit()
m_locale.Init();
m_reporters.clear();
m_reportCounter = 0;
if(!wxApp::OnInit())
{
@ -1637,6 +1638,32 @@ void MainFrame::OnTimer(wxTimerEvent &evt)
}
}
}
else if (
wxGetApp().m_sharedReporterObject &&
freedvInterface.getCurrentMode() == FREEDV_MODE_RADE &&
freedvInterface.getSync())
{
// Special case for RADE--report 'unk' for callsign so we can
// at least report that we're receiving *something*.
int64_t freq = wxGetApp().appConfiguration.reportingConfiguration.reportingFrequency;
// Only report if there's a valid reporting frequency and if we're not playing
// a recording through ourselves (to avoid false reports).
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(
"unk",
freedvInterface.getCurrentModeStr(),
freq,
0
);
}
}
}
}
// Run time update of EQ filters -----------------------------------

View File

@ -222,6 +222,8 @@ class MainApp : public wxApp
std::shared_ptr<LinkStep> linkStep;
wxLocale m_locale;
int m_reportCounter;
protected:
};