Add Tx and Rx frequency offsets

Enables specification of independant Tx and Rx offsets in Hz for Tx and Rx frequencies on DVMega and MMDVM_HS hardware.

Tx and Rx frequencies no longer have to be offset for frequency errors in ADF7021 devices and dashboards (BM/DMR+) will now display intended frequencies.
This commit is contained in:
g0wfv
2017-06-14 16:44:23 +01:00
parent 348e682610
commit 5e91c1159f
6 changed files with 33 additions and 7 deletions

View File

@@ -85,6 +85,8 @@ m_modemTXInvert(false),
m_modemPTTInvert(false),
m_modemTXDelay(100U),
m_modemDMRDelay(0U),
m_modemTxOffset(0),
m_modemRxOffset(0),
m_modemRXLevel(50.0F),
m_modemCWIdTXLevel(50.0F),
m_modemDStarTXLevel(50.0F),
@@ -327,6 +329,10 @@ bool CConf::read()
m_modemTXDelay = (unsigned int)::atoi(value);
else if (::strcmp(key, "DMRDelay") == 0)
m_modemDMRDelay = (unsigned int)::atoi(value);
else if (::strcmp(key, "RXOffset") == 0)
m_modemRxOffset = ::atoi(value);
else if (::strcmp(key, "TXOffset") == 0)
m_modemTxOffset = ::atoi(value);
else if (::strcmp(key, "RXLevel") == 0)
m_modemRXLevel = float(::atof(value));
else if (::strcmp(key, "TXLevel") == 0)
@@ -733,6 +739,16 @@ unsigned int CConf::getModemDMRDelay() const
return m_modemDMRDelay;
}
int CConf::getModemRxOffset() const
{
return m_modemRxOffset;
}
int CConf::getModemTxOffset() const
{
return m_modemTxOffset;
}
float CConf::getModemRXLevel() const
{
return m_modemRXLevel;