From 063b21f9991e4da949d11ca901127da64c66f664 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Mon, 18 May 2020 11:09:56 +0100 Subject: [PATCH] Try and make the closing callsign appear. --- FM.cpp | 2 +- FMKeyer.cpp | 5 +++++ FMKeyer.h | 2 ++ SerialPort.cpp | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/FM.cpp b/FM.cpp index 565e6eb..e37697f 100644 --- a/FM.cpp +++ b/FM.cpp @@ -235,7 +235,7 @@ void CFM::stateMachine(bool validSignal) } if (m_state == FS_LISTENING && m_modemState == STATE_FM) { - if (!m_callsign.isRunning() && !m_rfAck.isRunning()) { + if (!m_callsign.isWanted() && !m_rfAck.isWanted()) { DEBUG1("Change to STATE_IDLE"); m_modemState = STATE_IDLE; m_callsignTimer.stop(); diff --git a/FMKeyer.cpp b/FMKeyer.cpp index 8109fb0..851441e 100644 --- a/FMKeyer.cpp +++ b/FMKeyer.cpp @@ -205,6 +205,11 @@ void CFMKeyer::stop() m_audioPos = 0U; } +bool CFMKeyer::isWanted() const +{ + return m_wanted; +} + bool CFMKeyer::isRunning() const { return m_poPos > 0U || m_dotPos > 0U || m_audioPos > 0U; diff --git a/FMKeyer.h b/FMKeyer.h index 799e85c..5b7bef5 100644 --- a/FMKeyer.h +++ b/FMKeyer.h @@ -35,6 +35,8 @@ public: bool isRunning() const; + bool isWanted() const; + private: bool m_wanted; uint8_t m_poBuffer[1000U]; diff --git a/SerialPort.cpp b/SerialPort.cpp index 7d2c3c0..985e48d 100644 --- a/SerialPort.cpp +++ b/SerialPort.cpp @@ -103,7 +103,7 @@ const uint8_t MMDVM_DEBUG5 = 0xF5U; #define HW_TYPE "MMDVM" #endif -#define DESCRIPTION "20200512 (D-Star/DMR/System Fusion/P25/NXDN/POCSAG/FM)" +#define DESCRIPTION "20200518 (D-Star/DMR/System Fusion/P25/NXDN/POCSAG/FM)" #if defined(GITVERSION) #define concat(h, a, b, c) h " " a " " b " GitID #" c ""