Host support for the CallsignAtLatch option.
This commit is contained in:
parent
6d6cee119d
commit
1a142e36cb
8
Conf.cpp
8
Conf.cpp
|
@ -182,6 +182,7 @@ m_fmCallsignHighLevel(35.0F),
|
|||
m_fmCallsignLowLevel(15.0F),
|
||||
m_fmCallsignAtStart(true),
|
||||
m_fmCallsignAtEnd(true),
|
||||
m_fmCallsignAtLatch(true),
|
||||
m_fmRFAck("K"),
|
||||
m_fmExtAck("N"),
|
||||
m_fmAckSpeed(20U),
|
||||
|
@ -716,6 +717,8 @@ bool CConf::read()
|
|||
m_fmCallsignAtStart = ::atoi(value) == 1;
|
||||
else if (::strcmp(key, "CallsignAtEnd") == 0)
|
||||
m_fmCallsignAtEnd = ::atoi(value) == 1;
|
||||
else if (::strcmp(key, "CallsignAtLatch") == 0)
|
||||
m_fmCallsignAtLatch = ::atoi(value) == 1;
|
||||
else if (::strcmp(key, "RFAck") == 0) {
|
||||
// Convert the ack to upper case
|
||||
for (unsigned int i = 0U; value[i] != 0; i++)
|
||||
|
@ -1545,6 +1548,11 @@ bool CConf::getFMCallsignAtEnd() const
|
|||
return m_fmCallsignAtEnd;
|
||||
}
|
||||
|
||||
bool CConf::getFMCallsignAtLatch() const
|
||||
{
|
||||
return m_fmCallsignAtLatch;
|
||||
}
|
||||
|
||||
std::string CConf::getFMRFAck() const
|
||||
{
|
||||
return m_fmRFAck;
|
||||
|
|
2
Conf.h
2
Conf.h
|
@ -180,6 +180,7 @@ public:
|
|||
float getFMCallsignLowLevel() const;
|
||||
bool getFMCallsignAtStart() const;
|
||||
bool getFMCallsignAtEnd() const;
|
||||
bool getFMCallsignAtLatch() const;
|
||||
std::string getFMRFAck() const;
|
||||
std::string getFMExtAck() const;
|
||||
unsigned int getFMAckSpeed() const;
|
||||
|
@ -445,6 +446,7 @@ private:
|
|||
float m_fmCallsignLowLevel;
|
||||
bool m_fmCallsignAtStart;
|
||||
bool m_fmCallsignAtEnd;
|
||||
bool m_fmCallsignAtLatch;
|
||||
std::string m_fmRFAck;
|
||||
std::string m_fmExtAck;
|
||||
unsigned int m_fmAckSpeed;
|
||||
|
|
|
@ -150,6 +150,7 @@ CallsignHighLevel=50
|
|||
CallsignLowLevel=20
|
||||
CallsignAtStart=1
|
||||
CallsignAtEnd=1
|
||||
CallsignAtLatch=0
|
||||
RFAck=K
|
||||
ExtAck=N
|
||||
AckSpeed=20
|
||||
|
|
|
@ -1215,6 +1215,7 @@ bool CMMDVMHost::createModem()
|
|||
float callsignLowLevel = m_conf.getFMCallsignLowLevel();
|
||||
bool callsignAtStart = m_conf.getFMCallsignAtStart();
|
||||
bool callsignAtEnd = m_conf.getFMCallsignAtEnd();
|
||||
bool callsignAtLatch = m_conf.getFMCallsignAtLatch();
|
||||
std::string rfAck = m_conf.getFMRFAck();
|
||||
std::string extAck = m_conf.getFMExtAck();
|
||||
unsigned int ackSpeed = m_conf.getFMAckSpeed();
|
||||
|
@ -1244,6 +1245,7 @@ bool CMMDVMHost::createModem()
|
|||
LogInfo(" Callsign Low Level: %.1f%%", callsignLowLevel);
|
||||
LogInfo(" Callsign At Start: %s", callsignAtStart ? "yes" : "no");
|
||||
LogInfo(" Callsign At End: %s", callsignAtEnd ? "yes" : "no");
|
||||
LogInfo(" Callsign At Latch: %s", callsignAtLatch ? "yes" : "no");
|
||||
LogInfo(" RF Ack: %s", rfAck.c_str());
|
||||
// LogInfo(" Ext. Ack: %s", extAck.c_str());
|
||||
LogInfo(" Ack Speed: %uWPM", ackSpeed);
|
||||
|
@ -1263,7 +1265,7 @@ bool CMMDVMHost::createModem()
|
|||
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->setFMCallsignParams(callsign, callsignSpeed, callsignFrequency, callsignTime, callsignHoldoff, callsignHighLevel, callsignLowLevel, callsignAtStart, callsignAtEnd, callsignAtLatch);
|
||||
m_modem->setFMAckParams(rfAck, ackSpeed, ackFrequency, ackMinTime, ackDelay, ackLevel);
|
||||
m_modem->setFMMiscParams(timeout, timeoutLevel, ctcssFrequency, ctcssThreshold, ctcssLevel, kerchunkTime, hangTime, useCOS, rfAudioBoost, maxDevLevel);
|
||||
}
|
||||
|
|
|
@ -178,6 +178,7 @@ m_fmCallsignHighLevel(35.0F),
|
|||
m_fmCallsignLowLevel(15.0F),
|
||||
m_fmCallsignAtStart(true),
|
||||
m_fmCallsignAtEnd(true),
|
||||
m_fmCallsignAtLatch(true),
|
||||
m_fmRfAck("K"),
|
||||
m_fmAckSpeed(20U),
|
||||
m_fmAckFrequency(1750U),
|
||||
|
@ -1887,7 +1888,7 @@ bool CModem::writeDMRShortLC(const unsigned char* lc)
|
|||
return m_serial->write(buffer, 12U) == 12;
|
||||
}
|
||||
|
||||
void CModem::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)
|
||||
void CModem::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, bool callsignAtLatch)
|
||||
{
|
||||
m_fmCallsign = callsign;
|
||||
m_fmCallsignSpeed = callsignSpeed;
|
||||
|
@ -1898,6 +1899,7 @@ void CModem::setFMCallsignParams(const std::string& callsign, unsigned int calls
|
|||
m_fmCallsignLowLevel = callsignLowLevel;
|
||||
m_fmCallsignAtStart = callsignAtStart;
|
||||
m_fmCallsignAtEnd = callsignAtEnd;
|
||||
m_fmCallsignAtLatch = callsignAtLatch;
|
||||
}
|
||||
|
||||
void CModem::setFMAckParams(const std::string& rfAck, unsigned int ackSpeed, unsigned int ackFrequency, unsigned int ackMinTime, unsigned int ackDelay, float ackLevel)
|
||||
|
@ -1951,6 +1953,8 @@ bool CModem::setFMCallsignParams()
|
|||
buffer[9U] |= 0x01U;
|
||||
if (m_fmCallsignAtEnd)
|
||||
buffer[9U] |= 0x02U;
|
||||
if (m_fmCallsignAtLatch)
|
||||
buffer[9U] |= 0x04U;
|
||||
|
||||
for (unsigned int i = 0U; i < m_fmCallsign.size(); i++)
|
||||
buffer[10U + i] = m_fmCallsign.at(i);
|
||||
|
|
3
Modem.h
3
Modem.h
|
@ -45,7 +45,7 @@ public:
|
|||
virtual void setYSFParams(bool loDev, unsigned int txHang);
|
||||
virtual void setTransparentDataParams(unsigned int sendFrameType);
|
||||
|
||||
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 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, bool callsignAtLatch);
|
||||
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 rfAudioBoost, float maxDevLevel);
|
||||
|
||||
|
@ -194,6 +194,7 @@ private:
|
|||
float m_fmCallsignLowLevel;
|
||||
bool m_fmCallsignAtStart;
|
||||
bool m_fmCallsignAtEnd;
|
||||
bool m_fmCallsignAtLatch;
|
||||
std::string m_fmRfAck;
|
||||
unsigned int m_fmAckSpeed;
|
||||
unsigned int m_fmAckFrequency;
|
||||
|
|
Loading…
Reference in a new issue