Loosen the conditions for returning to STATE_IDLE

This commit is contained in:
Jonathan Naylor 2020-05-10 21:29:01 +01:00
parent d0062a55f8
commit 4cba5931f4
2 changed files with 10 additions and 12 deletions

20
FM.cpp
View File

@ -132,7 +132,7 @@ void CFM::samples(bool cos, const q15_t* samples, uint8_t length)
void CFM::process() void CFM::process()
{ {
q15_t sample; q15_t sample;
while(io.getSpace() >= 3U && m_outputRB.get(sample)) while (io.getSpace() >= 3U && m_outputRB.get(sample))
io.write(STATE_FM, &sample, 1U); io.write(STATE_FM, &sample, 1U);
} }
@ -235,16 +235,14 @@ void CFM::stateMachine(bool validSignal)
} }
if (m_state == FS_LISTENING && m_modemState == STATE_FM) { if (m_state == FS_LISTENING && m_modemState == STATE_FM) {
if (!m_callsign.isRunning() && !m_rfAck.isRunning()) { DEBUG1("Change to STATE_IDLE");
DEBUG1("Change to STATE_IDLE"); m_modemState = STATE_IDLE;
m_modemState = STATE_IDLE; m_callsignTimer.stop();
m_callsignTimer.stop(); m_timeoutTimer.stop();
m_timeoutTimer.stop(); m_kerchunkTimer.stop();
m_kerchunkTimer.stop(); m_ackMinTimer.stop();
m_ackMinTimer.stop(); m_ackDelayTimer.stop();
m_ackDelayTimer.stop(); m_hangTimer.stop();
m_hangTimer.stop();
}
} }
} }

View File

@ -101,7 +101,7 @@ const uint8_t MMDVM_DEBUG5 = 0xF5U;
#define HW_TYPE "MMDVM" #define HW_TYPE "MMDVM"
#endif #endif
#define DESCRIPTION "20200508 (D-Star/DMR/System Fusion/P25/NXDN/POCSAG/FM)" #define DESCRIPTION "20200510 (D-Star/DMR/System Fusion/P25/NXDN/POCSAG/FM)"
#if defined(GITVERSION) #if defined(GITVERSION)
#define concat(h, a, b, c) h " " a " " b " GitID #" c "" #define concat(h, a, b, c) h " " a " " b " GitID #" c ""