Stop any response from any mode when not enabled.

This commit is contained in:
Jonathan Naylor
2019-01-20 17:09:40 +00:00
parent 3d164b4148
commit 0f6945ef4e
6 changed files with 33 additions and 0 deletions

View File

@@ -137,6 +137,9 @@ bool CDMRSlot::writeModem(unsigned char *data, unsigned int len)
{
assert(data != NULL);
if (!m_enabled)
return false;
if (data[0U] == TAG_LOST && m_rfState == RS_RF_AUDIO) {
if (m_rssi != 0U)
LogMessage("DMR Slot %u, RF voice transmission lost, %.1f seconds, BER: %.1f%%, RSSI: -%u/-%u/-%u dBm", m_slotNo, float(m_rfFrames) / 16.667F, float(m_rfErrs * 100U) / float(m_rfBits), m_minRSSI, m_maxRSSI, m_aveRSSI / m_rssiCount);
@@ -991,6 +994,9 @@ void CDMRSlot::writeEndNet(bool writeEnd)
void CDMRSlot::writeNetwork(const CDMRData& dmrData)
{
if (!m_enabled)
return;
if (m_rfState != RS_RF_LISTENING && m_netState == RS_NET_IDLE)
return;