fix OVCM enum logical check

This commit is contained in:
Shawn Chain 2019-11-19 11:05:45 +08:00
parent c2584066d8
commit 2ecd9b3440

View file

@ -233,7 +233,7 @@ bool CDMRSlot::writeModem(unsigned char *data, unsigned int len)
return false;
}
lc->setOVCM((m_ovcm & DMR_OVCM_TX_ON) > 0);
lc->setOVCM(m_ovcm == DMR_OVCM_TX_ON || m_ovcm == DMR_OVCM_ON);
m_rfLC = lc;
// The standby LC data
@ -438,7 +438,7 @@ bool CDMRSlot::writeModem(unsigned char *data, unsigned int len)
return false;
// set the OVCM bit for the supported csbk
csbk.setOVCM((m_ovcm & DMR_OVCM_TX_ON) > 0);
csbk.setOVCM(m_ovcm == DMR_OVCM_TX_ON || m_ovcm == DMR_OVCM_ON);
bool gi = csbk.getGI();
unsigned int srcId = csbk.getSrcId();
@ -789,7 +789,7 @@ bool CDMRSlot::writeModem(unsigned char *data, unsigned int len)
return false;
}
lc->setOVCM((m_ovcm & DMR_OVCM_TX_ON) > 0);
lc->setOVCM(m_ovcm == DMR_OVCM_TX_ON || m_ovcm == DMR_OVCM_ON);
m_rfLC = lc;
// The standby LC data
@ -1045,7 +1045,7 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
dmrData.getSrcId(), dmrData.getFLCO() == FLCO_GROUP ? "TG" : "", dmrData.getDstId(),
srcId, flco == FLCO_GROUP ? "TG" : "", dstId);
lc->setOVCM((m_ovcm & DMR_OVCM_RX_ON) > 0);
lc->setOVCM(m_ovcm == DMR_OVCM_RX_ON || m_ovcm == DMR_OVCM_ON);
m_netLC = lc;
// The standby LC data
@ -1119,7 +1119,7 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
unsigned int dstId = lc->getDstId();
unsigned int srcId = lc->getSrcId();
lc->setOVCM((m_ovcm & DMR_OVCM_RX_ON) > 0);
lc->setOVCM(m_ovcm == DMR_OVCM_RX_ON || m_ovcm == DMR_OVCM_ON);
m_netLC = lc;
m_lastFrameValid = false;
@ -1305,7 +1305,7 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
unsigned int dstId = lc->getDstId();
unsigned int srcId = lc->getSrcId();
lc->setOVCM((m_ovcm & DMR_OVCM_RX_ON) > 0);
lc->setOVCM(m_ovcm == DMR_OVCM_RX_ON || m_ovcm == DMR_OVCM_ON);
m_netLC = lc;
// The standby LC data
@ -1575,7 +1575,7 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
return;
// set the OVCM bit for the supported csbk
csbk.setOVCM((m_ovcm & DMR_OVCM_RX_ON) > 0);
csbk.setOVCM(m_ovcm == DMR_OVCM_RX_ON || m_ovcm == DMR_OVCM_ON);
bool gi = csbk.getGI();
unsigned int srcId = csbk.getSrcId();