Rename RXBoost to RFAudioBoost.

This commit is contained in:
Jonathan Naylor
2020-04-28 14:39:14 +01:00
parent 70ca7c06dd
commit 4a923fb27e
7 changed files with 42 additions and 29 deletions

View File

@@ -183,7 +183,7 @@ m_fmCallsignLowLevel(15.0F),
m_fmCallsignAtStart(true),
m_fmCallsignAtEnd(true),
m_fmRFAck("K"),
m_fmNetAck("N"),
m_fmExtAck("N"),
m_fmAckSpeed(20U),
m_fmAckFrequency(1750U),
m_fmAckMinTime(5U),
@@ -197,8 +197,9 @@ m_fmCTCSSLevel(2.0F),
m_fmKerchunkTime(0U),
m_fmHangTime(7U),
m_fmUseCOS(true),
m_fmRXBoost(1U),
m_fmRFAudioBoost(1U),
m_fmMaxDevLevel(90.0F),
m_fmExtAudioBoost(1U),
m_dstarNetworkEnabled(false),
m_dstarGatewayAddress(),
m_dstarGatewayPort(0U),
@@ -720,11 +721,11 @@ bool CConf::read()
for (unsigned int i = 0U; value[i] != 0; i++)
value[i] = ::toupper(value[i]);
m_fmRFAck = value;
} else if (::strcmp(key, "NetAck") == 0) {
} else if (::strcmp(key, "ExtAck") == 0) {
// Convert the ack to upper case
for (unsigned int i = 0U; value[i] != 0; i++)
value[i] = ::toupper(value[i]);
m_fmNetAck = value;
m_fmExtAck = value;
} else if (::strcmp(key, "AckSpeed") == 0)
m_fmAckSpeed = (unsigned int)::atoi(value);
else if (::strcmp(key, "AckFrequency") == 0)
@@ -751,10 +752,12 @@ bool CConf::read()
m_fmHangTime = (unsigned int)::atoi(value);
else if (::strcmp(key, "UseCOS") == 0)
m_fmUseCOS = ::atoi(value) == 1;
else if (::strcmp(key, "RXBoost") == 0)
m_fmRXBoost = (unsigned int)::atoi(value);
else if (::strcmp(key, "RFAudioBoost") == 0)
m_fmRFAudioBoost = (unsigned int)::atoi(value);
else if (::strcmp(key, "MaxDevLevel") == 0)
m_fmMaxDevLevel = float(::atof(value));
else if (::strcmp(key, "ExtAudioBoost") == 0)
m_fmExtAudioBoost = (unsigned int)::atoi(value);
} else if (section == SECTION_DSTAR_NETWORK) {
if (::strcmp(key, "Enable") == 0)
m_dstarNetworkEnabled = ::atoi(value) == 1;
@@ -1547,9 +1550,9 @@ std::string CConf::getFMRFAck() const
return m_fmRFAck;
}
std::string CConf::getFMNetAck() const
std::string CConf::getFMExtAck() const
{
return m_fmNetAck;
return m_fmExtAck;
}
unsigned int CConf::getFMAckSpeed() const
@@ -1617,9 +1620,9 @@ bool CConf::getFMUseCOS() const
return m_fmUseCOS;
}
unsigned int CConf::getFMRXBoost() const
unsigned int CConf::getFMRFAudioBoost() const
{
return m_fmRXBoost;
return m_fmRFAudioBoost;
}
float CConf::getFMMaxDevLevel() const
@@ -1627,6 +1630,11 @@ float CConf::getFMMaxDevLevel() const
return m_fmMaxDevLevel;
}
unsigned int CConf::getFMExtAudioBoost() const
{
return m_fmExtAudioBoost;
}
bool CConf::getDStarNetworkEnabled() const
{
return m_dstarNetworkEnabled;

10
Conf.h
View File

@@ -181,7 +181,7 @@ public:
bool getFMCallsignAtStart() const;
bool getFMCallsignAtEnd() const;
std::string getFMRFAck() const;
std::string getFMNetAck() const;
std::string getFMExtAck() const;
unsigned int getFMAckSpeed() const;
unsigned int getFMAckFrequency() const;
unsigned int getFMAckMinTime() const;
@@ -195,8 +195,9 @@ public:
unsigned int getFMKerchunkTime() const;
unsigned int getFMHangTime() const;
bool getFMUseCOS() const;
unsigned int getFMRXBoost() const;
unsigned int getFMRFAudioBoost() const;
float getFMMaxDevLevel() const;
unsigned int getFMExtAudioBoost() const;
// The D-Star Network section
bool getDStarNetworkEnabled() const;
@@ -445,7 +446,7 @@ private:
bool m_fmCallsignAtStart;
bool m_fmCallsignAtEnd;
std::string m_fmRFAck;
std::string m_fmNetAck;
std::string m_fmExtAck;
unsigned int m_fmAckSpeed;
unsigned int m_fmAckFrequency;
unsigned int m_fmAckMinTime;
@@ -459,8 +460,9 @@ private:
unsigned int m_fmKerchunkTime;
unsigned int m_fmHangTime;
bool m_fmUseCOS;
unsigned int m_fmRXBoost;
unsigned int m_fmRFAudioBoost;
float m_fmMaxDevLevel;
unsigned int m_fmExtAudioBoost;
bool m_dstarNetworkEnabled;
std::string m_dstarGatewayAddress;

View File

@@ -43,7 +43,7 @@ Time=24
[Modem]
# Port=/dev/ttyACM0
# Port=/dev/ttyAMA0
Port=\\.\COM3
Port=\\.\COM4
Protocol=uart
# Address=0x22
TXInvert=1
@@ -151,7 +151,7 @@ CallsignLowLevel=20
CallsignAtStart=1
CallsignAtEnd=1
RFAck=K
# NetAck=N
ExtAck=N
AckSpeed=20
AckFrequency=1750
AckMinTime=4
@@ -165,8 +165,9 @@ CTCSSLevel=20
KerchunkTime=0
HangTime=7
UseCOS=1
RXBoost=1
RFAudioBoost=1
MaxDevLevel=90
ExtAudioBoost=1
[D-Star Network]
Enable=1

View File

@@ -1216,7 +1216,7 @@ bool CMMDVMHost::createModem()
bool callsignAtStart = m_conf.getFMCallsignAtStart();
bool callsignAtEnd = m_conf.getFMCallsignAtEnd();
std::string rfAck = m_conf.getFMRFAck();
std::string netAck = m_conf.getFMNetAck();
std::string extAck = m_conf.getFMExtAck();
unsigned int ackSpeed = m_conf.getFMAckSpeed();
unsigned int ackFrequency = m_conf.getFMAckFrequency();
unsigned int ackMinTime = m_conf.getFMAckMinTime();
@@ -1230,8 +1230,9 @@ bool CMMDVMHost::createModem()
unsigned int kerchunkTime = m_conf.getFMKerchunkTime();
unsigned int hangTime = m_conf.getFMHangTime();
bool useCOS = m_conf.getFMUseCOS();
unsigned int rxBoost = m_conf.getFMRXBoost();
unsigned int rfAudioBoost = m_conf.getFMRFAudioBoost();
float maxDevLevel = m_conf.getFMMaxDevLevel();
unsigned int extAudioBoost = m_conf.getFMExtAudioBoost();
LogInfo("FM Parameters");
LogInfo(" Callsign: %s", callsign.c_str());
@@ -1244,7 +1245,7 @@ bool CMMDVMHost::createModem()
LogInfo(" Callsign At Start: %s", callsignAtStart ? "yes" : "no");
LogInfo(" Callsign At End: %s", callsignAtEnd ? "yes" : "no");
LogInfo(" RF Ack: %s", rfAck.c_str());
// LogInfo(" Net Ack: %s", netAck.c_str());
// LogInfo(" Ext. Ack: %s", extAck.c_str());
LogInfo(" Ack Speed: %uWPM", ackSpeed);
LogInfo(" Ack Frequency: %uHz", ackFrequency);
LogInfo(" Ack Min Time: %us", ackMinTime);
@@ -1258,12 +1259,13 @@ bool CMMDVMHost::createModem()
LogInfo(" Kerchunk Time: %us", kerchunkTime);
LogInfo(" Hang Time: %us", hangTime);
LogInfo(" Use COS: %s", useCOS ? "yes" : "no");
LogInfo(" RX Boost: x%u", rxBoost);
LogInfo(" RF Audio Boost: x%u", rfAudioBoost);
LogInfo(" Max. Deviation Level: %.1f%%", maxDevLevel);
// LogInfo(" Ext. Audio Boost: x%u", extAudioBoost);
m_modem->setFMCallsignParams(callsign, callsignSpeed, callsignFrequency, callsignTime, callsignHoldoff, callsignHighLevel, callsignLowLevel, callsignAtStart, callsignAtEnd);
m_modem->setFMAckParams(rfAck, ackSpeed, ackFrequency, ackMinTime, ackDelay, ackLevel);
m_modem->setFMMiscParams(timeout, timeoutLevel, ctcssFrequency, ctcssThreshold, ctcssLevel, kerchunkTime, hangTime, useCOS, rxBoost, maxDevLevel);
m_modem->setFMMiscParams(timeout, timeoutLevel, ctcssFrequency, ctcssThreshold, ctcssLevel, kerchunkTime, hangTime, useCOS, rfAudioBoost, maxDevLevel);
}
bool ret = m_modem->open();

View File

@@ -192,7 +192,7 @@ m_fmCtcssLevel(10.0F),
m_fmKerchunkTime(0U),
m_fmHangTime(5U),
m_fmUseCOS(true),
m_fmRXBoost(1U),
m_fmRFAudioBoost(1U),
m_fmMaxDevLevel(90.0F)
{
m_buffer = new unsigned char[BUFFER_LENGTH];
@@ -1905,7 +1905,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 rxBoost, 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, unsigned int rfAudioBoost, float maxDevLevel)
{
m_fmTimeout = timeout;
m_fmTimeoutLevel = timeoutLevel;
@@ -1918,7 +1918,7 @@ void CModem::setFMMiscParams(unsigned int timeout, float timeoutLevel, float ctc
m_fmHangTime = hangTime;
m_fmUseCOS = useCOS;
m_fmRXBoost = rxBoost;
m_fmRFAudioBoost = rfAudioBoost;
m_fmMaxDevLevel = maxDevLevel;
}
@@ -2057,7 +2057,7 @@ bool CModem::setFMMiscParams()
if (m_fmUseCOS)
buffer[10U] |= 0x01U;
buffer[11U] = m_fmRXBoost;
buffer[11U] = m_fmRFAudioBoost;
buffer[12U] = (unsigned char)(m_fmMaxDevLevel * 2.55F + 0.5F);

View File

@@ -47,7 +47,7 @@ public:
virtual void setFMCallsignParams(const std::string& callsign, unsigned int callsignSpeed, unsigned int callsignFrequency, unsigned int callsignTime, unsigned int callsignHoldoff, float callsignHighLevel, float callsignLowLevel, bool callsignAtStart, bool callsignAtEnd);
virtual void setFMAckParams(const std::string& rfAck, unsigned int ackSpeed, unsigned int ackFrequency, unsigned int ackMinTime, unsigned int ackDelay, float ackLevel);
virtual void setFMMiscParams(unsigned int timeout, float timeoutLevel, float ctcssFrequency, unsigned int ctcssThreshold, float ctcssLevel, unsigned int kerchunkTime, unsigned int hangTime, bool useCOS, unsigned int rxBoost, float maxDevLevel);
virtual void 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);
virtual bool open();
@@ -207,7 +207,7 @@ private:
unsigned int m_fmKerchunkTime;
unsigned int m_fmHangTime;
bool m_fmUseCOS;
unsigned int m_fmRXBoost;
unsigned int m_fmRFAudioBoost;
float m_fmMaxDevLevel;
bool readVersion();

View File

@@ -19,6 +19,6 @@
#if !defined(VERSION_H)
#define VERSION_H
const char* VERSION = "20200426";
const char* VERSION = "20200428";
#endif