Add mode 4 (force off) for the DMR OVCM flag.

This commit is contained in:
Jonathan Naylor
2021-03-07 17:42:55 +00:00
parent 5537ebbb65
commit 5d8d1a3fb9
10 changed files with 61 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015-2020 Jonathan Naylor, G4KLX
* Copyright (C) 2015-2021 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
@@ -236,6 +236,11 @@ bool CDMRSlot::writeModem(unsigned char *data, unsigned int len)
lc->setOVCM(m_ovcm == DMR_OVCM_TX_ON || m_ovcm == DMR_OVCM_ON);
m_rfLC = lc;
if (m_ovcm == DMR_OVCM_FORCE_OFF) {
lc->clearOVCM();
m_rfLC = lc;
}
// The standby LC data
m_rfEmbeddedLC.setLC(*m_rfLC);
m_rfEmbeddedData[0U].setLC(*m_rfLC);
@@ -439,6 +444,9 @@ bool CDMRSlot::writeModem(unsigned char *data, unsigned int len)
// set the OVCM bit for the supported csbk
csbk.setOVCM(m_ovcm == DMR_OVCM_TX_ON || m_ovcm == DMR_OVCM_ON);
if (m_ovcm == DMR_OVCM_FORCE_OFF)
csbk.clearOVCM();
bool gi = csbk.getGI();
unsigned int srcId = csbk.getSrcId();
unsigned int dstId = csbk.getDstId();
@@ -797,6 +805,11 @@ bool CDMRSlot::writeModem(unsigned char *data, unsigned int len)
lc->setOVCM(m_ovcm == DMR_OVCM_TX_ON || m_ovcm == DMR_OVCM_ON);
m_rfLC = lc;
if (m_ovcm == DMR_OVCM_FORCE_OFF) {
lc->clearOVCM();
m_rfLC = lc;
}
// The standby LC data
m_rfEmbeddedLC.setLC(*m_rfLC);
m_rfEmbeddedData[0U].setLC(*m_rfLC);
@@ -1053,6 +1066,11 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
lc->setOVCM(m_ovcm == DMR_OVCM_RX_ON || m_ovcm == DMR_OVCM_ON);
m_netLC = lc;
if (m_ovcm == DMR_OVCM_FORCE_OFF) {
lc->clearOVCM();
m_netLC = lc;
}
// The standby LC data
m_netEmbeddedLC.setLC(*m_netLC);
m_netEmbeddedData[0U].setLC(*m_netLC);
@@ -1128,6 +1146,11 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
lc->setOVCM(m_ovcm == DMR_OVCM_RX_ON || m_ovcm == DMR_OVCM_ON);
m_netLC = lc;
if (m_ovcm == DMR_OVCM_FORCE_OFF) {
lc->clearOVCM();
m_netLC = lc;
}
m_lastFrameValid = false;
m_netTimeoutTimer.start();
@@ -1315,6 +1338,11 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
lc->setOVCM(m_ovcm == DMR_OVCM_RX_ON || m_ovcm == DMR_OVCM_ON);
m_netLC = lc;
if (m_ovcm == DMR_OVCM_FORCE_OFF) {
lc->clearOVCM();
m_netLC = lc;
}
// The standby LC data
m_netEmbeddedLC.setLC(*m_netLC);
m_netEmbeddedData[0U].setLC(*m_netLC);
@@ -1586,6 +1614,9 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
// set the OVCM bit for the supported csbk
csbk.setOVCM(m_ovcm == DMR_OVCM_RX_ON || m_ovcm == DMR_OVCM_ON);
if (m_ovcm == DMR_OVCM_FORCE_OFF)
csbk.clearOVCM();
bool gi = csbk.getGI();
unsigned int srcId = csbk.getSrcId();
unsigned int dstId = csbk.getDstId();