Clean up the OVCM CSBK code.

This commit is contained in:
Jonathan Naylor
2019-11-07 13:47:19 +00:00
parent e74df4875b
commit 231efdf567

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX * Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
* Copyright (C) 2019 by Patrick Maier DK5MP
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -156,17 +157,15 @@ bool CDMRCSBK::getOVCM() const
// "Unit to Unit Voice Service Request CSBK" and // "Unit to Unit Voice Service Request CSBK" and
// "Unit to Unit Voice Service Answer Response CSBK" // "Unit to Unit Voice Service Answer Response CSBK"
if ((m_CSBKO == CSBKO_UUVREQ) || (m_CSBKO == CSBKO_UUANSRSP)) if ((m_CSBKO == CSBKO_UUVREQ) || (m_CSBKO == CSBKO_UUANSRSP))
{
bOVCM = (m_data[2U] & 0x04U) == 0x04U; bOVCM = (m_data[2U] & 0x04U) == 0x04U;
}
return bOVCM; return bOVCM;
} }
void CDMRCSBK::setOVCM(bool ovcm) void CDMRCSBK::setOVCM(bool ovcm)
{ {
// Set OVCM only in CSBKs having the service options information // Set OVCM only in CSBKs having the service options information
if ((m_CSBKO == CSBKO_UUVREQ) || (m_CSBKO == CSBKO_UUANSRSP)) if ((m_CSBKO == CSBKO_UUVREQ) || (m_CSBKO == CSBKO_UUANSRSP)) {
{
if (ovcm) if (ovcm)
m_data[2U] |= 0x04U; m_data[2U] |= 0x04U;
else else