diff --git a/cmake/version.h.in b/cmake/version.h.in index df90cf9b..604f2d78 100644 --- a/cmake/version.h.in +++ b/cmake/version.h.in @@ -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) diff --git a/src/main.cpp b/src/main.cpp index a2ecda41..bdbaa753 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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 ----------------------------------- diff --git a/src/main.h b/src/main.h index 006f65a9..f445600b 100644 --- a/src/main.h +++ b/src/main.h @@ -222,6 +222,8 @@ class MainApp : public wxApp std::shared_ptr linkStep; wxLocale m_locale; + + int m_reportCounter; protected: };