mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 06:55:52 +08:00
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:
@@ -815,6 +815,8 @@ bool CMMDVMHost::createModem()
|
||||
bool lowDeviation = m_conf.getFusionLowDeviation();
|
||||
unsigned int rxFrequency = m_conf.getRxFrequency();
|
||||
unsigned int txFrequency = m_conf.getTxFrequency();
|
||||
int rxOffset = m_conf.getModemRxOffset();
|
||||
int txOffset = m_conf.getModemTxOffset();
|
||||
|
||||
LogInfo("Modem Parameters");
|
||||
LogInfo(" Port: %s", port.c_str());
|
||||
@@ -822,6 +824,8 @@ bool CMMDVMHost::createModem()
|
||||
LogInfo(" TX Invert: %s", txInvert ? "yes" : "no");
|
||||
LogInfo(" PTT Invert: %s", pttInvert ? "yes" : "no");
|
||||
LogInfo(" TX Delay: %ums", txDelay);
|
||||
LogInfo(" RX Offset: %dHz", rxOffset);
|
||||
LogInfo(" TX Offset: %dHz", txOffset);
|
||||
LogInfo(" DMR Delay: %u (%.1fms)", dmrDelay, float(dmrDelay) * 0.0416666F);
|
||||
LogInfo(" RX Level: %.1f%%", rxLevel);
|
||||
LogInfo(" CW Id TX Level: %.1f%%", cwIdTXLevel);
|
||||
@@ -829,13 +833,13 @@ bool CMMDVMHost::createModem()
|
||||
LogInfo(" DMR TX Level: %.1f%%", dmrTXLevel);
|
||||
LogInfo(" YSF TX Level: %.1f%%", ysfTXLevel);
|
||||
LogInfo(" P25 TX Level: %.1f%%", p25TXLevel);
|
||||
LogInfo(" RX Frequency: %uHz", rxFrequency);
|
||||
LogInfo(" TX Frequency: %uHz", txFrequency);
|
||||
LogInfo(" RX Frequency: %uHz (%uHz)", rxFrequency, rxFrequency + rxOffset);
|
||||
LogInfo(" TX Frequency: %uHz (%uHz)", txFrequency, txFrequency + txOffset);
|
||||
|
||||
m_modem = new CModem(port, m_duplex, rxInvert, txInvert, pttInvert, txDelay, dmrDelay, trace, debug);
|
||||
m_modem->setModeParams(m_dstarEnabled, m_dmrEnabled, m_ysfEnabled, m_p25Enabled);
|
||||
m_modem->setLevels(rxLevel, cwIdTXLevel, dstarTXLevel, dmrTXLevel, ysfTXLevel, p25TXLevel);
|
||||
m_modem->setRFParams(rxFrequency, txFrequency);
|
||||
m_modem->setRFParams(rxFrequency, rxOffset, txFrequency, txOffset);
|
||||
m_modem->setDMRParams(colorCode);
|
||||
m_modem->setYSFParams(lowDeviation);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user