mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-20 22:45:44 +08:00
Stop any response from any mode when not enabled.
This commit is contained in:
@@ -116,6 +116,9 @@ bool CP25Control::writeModem(unsigned char* data, unsigned int len)
|
||||
{
|
||||
assert(data != NULL);
|
||||
|
||||
if (!m_enabled)
|
||||
return false;
|
||||
|
||||
bool sync = data[1U] == 0x01U;
|
||||
|
||||
if (data[0U] == TAG_LOST && m_rfState == RS_RF_AUDIO) {
|
||||
@@ -604,6 +607,9 @@ void CP25Control::writeNetwork()
|
||||
if (length == 0U)
|
||||
return;
|
||||
|
||||
if (!m_enabled)
|
||||
return;
|
||||
|
||||
if (m_rfState != RS_RF_LISTENING && m_netState == RS_NET_IDLE)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user