diff --git a/DMRNetwork.cpp b/DMRNetwork.cpp index 7301b5a..80ac444 100644 --- a/DMRNetwork.cpp +++ b/DMRNetwork.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2015,2016,2017,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2015-2019 by Jonathan Naylor G4KLX * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -136,6 +136,9 @@ bool CDMRNetwork::open() void CDMRNetwork::enable(bool enabled) { + if (!enabled && m_enabled) + m_rxData.clear(); + m_enabled = enabled; } diff --git a/DStarNetwork.cpp b/DStarNetwork.cpp index ebf971f..de0af69 100644 --- a/DStarNetwork.cpp +++ b/DStarNetwork.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2014,2016 by Jonathan Naylor G4KLX + * Copyright (C) 2009-2014,2016,2019 by Jonathan Naylor G4KLX * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -320,6 +320,8 @@ void CDStarNetwork::enable(bool enabled) { if (enabled && !m_enabled) reset(); + else if (!enabled && m_enabled) + m_buffer.clear(); m_enabled = enabled; } diff --git a/MMDVMHost.cpp b/MMDVMHost.cpp index 2ad36b2..735ec4f 100644 --- a/MMDVMHost.cpp +++ b/MMDVMHost.cpp @@ -1684,31 +1684,31 @@ void CMMDVMHost::remoteControl() REMOTE_COMMAND command = m_remoteControl->getCommand(); switch(command) { case RCD_MODE_IDLE: - if (!isBusy()) + if (m_mode != MODE_IDLE) setMode(MODE_IDLE); break; case RCD_MODE_LOCKOUT: - if (!isBusy()) + if (m_mode != MODE_LOCKOUT) setMode(MODE_LOCKOUT); break; case RCD_MODE_DSTAR: - if (!isBusy()) + if (m_dstar != NULL && m_mode != MODE_DSTAR) setMode(MODE_DSTAR); break; case RCD_MODE_DMR: - if (!isBusy()) + if (m_dmr != NULL && m_mode != MODE_DMR) setMode(MODE_DMR); break; case RCD_MODE_YSF: - if (!isBusy()) + if (m_ysf != NULL && m_mode != MODE_YSF) setMode(MODE_YSF); break; case RCD_MODE_P25: - if (!isBusy()) + if (m_p25 != NULL && m_mode != MODE_P25) setMode(MODE_P25); break; case RCD_MODE_NXDN: - if (!isBusy()) + if (m_nxdn != NULL && m_mode != MODE_NXDN) setMode(MODE_NXDN); break; default: diff --git a/NXDNNetwork.cpp b/NXDNNetwork.cpp index f724dea..9e26900 100644 --- a/NXDNNetwork.cpp +++ b/NXDNNetwork.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2014,2016,2018 by Jonathan Naylor G4KLX + * Copyright (C) 2009-2014,2016,2018,2019 by Jonathan Naylor G4KLX * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -162,6 +162,8 @@ void CNXDNNetwork::enable(bool enabled) { if (enabled && !m_enabled) reset(); + else if (!enabled && m_enabled) + m_buffer.clear(); m_enabled = enabled; } diff --git a/P25Network.cpp b/P25Network.cpp index d0428a8..14a0fd5 100644 --- a/P25Network.cpp +++ b/P25Network.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2014,2016 by Jonathan Naylor G4KLX + * Copyright (C) 2009-2014,2016,2019 by Jonathan Naylor G4KLX * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -431,5 +431,8 @@ void CP25Network::close() void CP25Network::enable(bool enabled) { + if (!enabled && m_enabled) + m_buffer.clear(); + m_enabled = enabled; } diff --git a/POCSAGNetwork.cpp b/POCSAGNetwork.cpp index d617458..682fdd1 100644 --- a/POCSAGNetwork.cpp +++ b/POCSAGNetwork.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 by Jonathan Naylor G4KLX + * Copyright (C) 2018,2019 by Jonathan Naylor G4KLX * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -113,6 +113,8 @@ void CPOCSAGNetwork::enable(bool enabled) { if (enabled && !m_enabled) reset(); + else if (!enabled && m_enabled) + m_buffer.clear(); unsigned char c = enabled ? 0x00U : 0xFFU; diff --git a/YSFNetwork.cpp b/YSFNetwork.cpp index 63518b4..a8effba 100644 --- a/YSFNetwork.cpp +++ b/YSFNetwork.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2014,2016 by Jonathan Naylor G4KLX + * Copyright (C) 2009-2014,2016,2019 by Jonathan Naylor G4KLX * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -196,6 +196,8 @@ void CYSFNetwork::enable(bool enabled) { if (enabled && !m_enabled) reset(); + else if (!enabled && m_enabled) + m_buffer.clear(); m_enabled = enabled; }