Add the COSInvert parameter.

This commit is contained in:
Jonathan Naylor
2020-05-06 11:26:54 +01:00
parent da0f1a6a76
commit 5410ca3ce8
7 changed files with 23 additions and 4 deletions

View File

@@ -193,6 +193,7 @@ m_fmCtcssLevel(10.0F),
m_fmKerchunkTime(0U),
m_fmHangTime(5U),
m_fmUseCOS(true),
m_fmCOSInvert(false),
m_fmRFAudioBoost(1U),
m_fmMaxDevLevel(90.0F)
{
@@ -1912,7 +1913,7 @@ void CModem::setFMAckParams(const std::string& rfAck, unsigned int ackSpeed, uns
m_fmAckLevel = ackLevel;
}
void CModem::setFMMiscParams(unsigned int timeout, float timeoutLevel, float ctcssFrequency, unsigned int ctcssThreshold, float ctcssLevel, unsigned int kerchunkTime, unsigned int hangTime, bool useCOS, unsigned int rfAudioBoost, float maxDevLevel)
void CModem::setFMMiscParams(unsigned int timeout, float timeoutLevel, float ctcssFrequency, unsigned int ctcssThreshold, float ctcssLevel, unsigned int kerchunkTime, unsigned int hangTime, bool useCOS, bool cosInvert, unsigned int rfAudioBoost, float maxDevLevel)
{
m_fmTimeout = timeout;
m_fmTimeoutLevel = timeoutLevel;
@@ -1925,6 +1926,8 @@ void CModem::setFMMiscParams(unsigned int timeout, float timeoutLevel, float ctc
m_fmHangTime = hangTime;
m_fmUseCOS = useCOS;
m_fmCOSInvert = cosInvert;
m_fmRFAudioBoost = rfAudioBoost;
m_fmMaxDevLevel = maxDevLevel;
}
@@ -2065,6 +2068,8 @@ bool CModem::setFMMiscParams()
buffer[10U] = 0x00U;
if (m_fmUseCOS)
buffer[10U] |= 0x01U;
if (m_fmCOSInvert)
buffer[10U] |= 0x02U;
buffer[11U] = m_fmRFAudioBoost;