mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 06:55:52 +08:00
Split the RF and Network acks.
This commit is contained in:
21
Conf.cpp
21
Conf.cpp
@@ -183,7 +183,8 @@ m_fmCallsignHighLevel(80.0F),
|
|||||||
m_fmCallsignLowLevel(40.0F),
|
m_fmCallsignLowLevel(40.0F),
|
||||||
m_fmCallsignAtStart(true),
|
m_fmCallsignAtStart(true),
|
||||||
m_fmCallsignAtEnd(true),
|
m_fmCallsignAtEnd(true),
|
||||||
m_fmAck("K"),
|
m_fmRFAck("K"),
|
||||||
|
m_fmNetAck("N"),
|
||||||
m_fmAckSpeed(20U),
|
m_fmAckSpeed(20U),
|
||||||
m_fmAckFrequency(1750U),
|
m_fmAckFrequency(1750U),
|
||||||
m_fmAckDelay(1000U),
|
m_fmAckDelay(1000U),
|
||||||
@@ -712,11 +713,16 @@ bool CConf::read()
|
|||||||
m_fmCallsignAtStart = ::atoi(value) == 1;
|
m_fmCallsignAtStart = ::atoi(value) == 1;
|
||||||
else if (::strcmp(key, "CallsignAtEnd") == 0)
|
else if (::strcmp(key, "CallsignAtEnd") == 0)
|
||||||
m_fmCallsignAtEnd = ::atoi(value) == 1;
|
m_fmCallsignAtEnd = ::atoi(value) == 1;
|
||||||
else if (::strcmp(key, "Ack") == 0) {
|
else if (::strcmp(key, "RFAck") == 0) {
|
||||||
// Convert the ack to upper case
|
// Convert the ack to upper case
|
||||||
for (unsigned int i = 0U; value[i] != 0; i++)
|
for (unsigned int i = 0U; value[i] != 0; i++)
|
||||||
value[i] = ::toupper(value[i]);
|
value[i] = ::toupper(value[i]);
|
||||||
m_fmAck = value;
|
m_fmRFAck = value;
|
||||||
|
} else if (::strcmp(key, "NetAck") == 0) {
|
||||||
|
// Convert the ack to upper case
|
||||||
|
for (unsigned int i = 0U; value[i] != 0; i++)
|
||||||
|
value[i] = ::toupper(value[i]);
|
||||||
|
m_fmNetAck = value;
|
||||||
} else if (::strcmp(key, "AckSpeed") == 0)
|
} else if (::strcmp(key, "AckSpeed") == 0)
|
||||||
m_fmAckSpeed = (unsigned int)::atoi(value);
|
m_fmAckSpeed = (unsigned int)::atoi(value);
|
||||||
else if (::strcmp(key, "AckFrequency") == 0)
|
else if (::strcmp(key, "AckFrequency") == 0)
|
||||||
@@ -1529,9 +1535,14 @@ bool CConf::getFMCallsignAtEnd() const
|
|||||||
return m_fmCallsignAtEnd;
|
return m_fmCallsignAtEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CConf::getFMAck() const
|
std::string CConf::getFMRFAck() const
|
||||||
{
|
{
|
||||||
return m_fmAck;
|
return m_fmRFAck;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string CConf::getFMNetAck() const
|
||||||
|
{
|
||||||
|
return m_fmNetAck;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CConf::getFMAckSpeed() const
|
unsigned int CConf::getFMAckSpeed() const
|
||||||
|
|||||||
6
Conf.h
6
Conf.h
@@ -181,7 +181,8 @@ public:
|
|||||||
float getFMCallsignLowLevel() const;
|
float getFMCallsignLowLevel() const;
|
||||||
bool getFMCallsignAtStart() const;
|
bool getFMCallsignAtStart() const;
|
||||||
bool getFMCallsignAtEnd() const;
|
bool getFMCallsignAtEnd() const;
|
||||||
std::string getFMAck() const;
|
std::string getFMRFAck() const;
|
||||||
|
std::string getFMNetAck() const;
|
||||||
unsigned int getFMAckSpeed() const;
|
unsigned int getFMAckSpeed() const;
|
||||||
unsigned int getFMAckFrequency() const;
|
unsigned int getFMAckFrequency() const;
|
||||||
unsigned int getFMAckDelay() const;
|
unsigned int getFMAckDelay() const;
|
||||||
@@ -440,7 +441,8 @@ private:
|
|||||||
float m_fmCallsignLowLevel;
|
float m_fmCallsignLowLevel;
|
||||||
bool m_fmCallsignAtStart;
|
bool m_fmCallsignAtStart;
|
||||||
bool m_fmCallsignAtEnd;
|
bool m_fmCallsignAtEnd;
|
||||||
std::string m_fmAck;
|
std::string m_fmRFAck;
|
||||||
|
std::string m_fmNetAck;
|
||||||
unsigned int m_fmAckSpeed;
|
unsigned int m_fmAckSpeed;
|
||||||
unsigned int m_fmAckFrequency;
|
unsigned int m_fmAckFrequency;
|
||||||
unsigned int m_fmAckDelay;
|
unsigned int m_fmAckDelay;
|
||||||
|
|||||||
@@ -151,7 +151,8 @@ CallsignHighLevel=80
|
|||||||
CallsignLowLevel=40
|
CallsignLowLevel=40
|
||||||
CallsignAtStart=1
|
CallsignAtStart=1
|
||||||
CallsignAtEnd=1
|
CallsignAtEnd=1
|
||||||
Ack=K
|
RFAck=K
|
||||||
|
NetAck=N
|
||||||
AckSpeed=20
|
AckSpeed=20
|
||||||
AckFrequency=1750
|
AckFrequency=1750
|
||||||
AckDelay=1000
|
AckDelay=1000
|
||||||
|
|||||||
@@ -616,7 +616,8 @@ int CMMDVMHost::run()
|
|||||||
float callsignLowLevel = m_conf.getFMCallsignLowLevel();
|
float callsignLowLevel = m_conf.getFMCallsignLowLevel();
|
||||||
bool callsignAtStart = m_conf.getFMCallsignAtStart();
|
bool callsignAtStart = m_conf.getFMCallsignAtStart();
|
||||||
bool callsignAtEnd = m_conf.getFMCallsignAtEnd();
|
bool callsignAtEnd = m_conf.getFMCallsignAtEnd();
|
||||||
std::string ack = m_conf.getFMCallsign();
|
std::string rfAck = m_conf.getFMRFAck();
|
||||||
|
std::string netAck = m_conf.getFMNetAck();
|
||||||
unsigned int ackSpeed = m_conf.getFMAckSpeed();
|
unsigned int ackSpeed = m_conf.getFMAckSpeed();
|
||||||
unsigned int ackFrequency = m_conf.getFMAckFrequency();
|
unsigned int ackFrequency = m_conf.getFMAckFrequency();
|
||||||
unsigned int ackDelay = m_conf.getFMAckDelay();
|
unsigned int ackDelay = m_conf.getFMAckDelay();
|
||||||
@@ -639,7 +640,8 @@ int CMMDVMHost::run()
|
|||||||
LogInfo(" Callsign Low Level: %.1f%%", callsignLowLevel);
|
LogInfo(" Callsign Low Level: %.1f%%", callsignLowLevel);
|
||||||
LogInfo(" Callsign At Start: %s", callsignAtStart ? "yes" : "no");
|
LogInfo(" Callsign At Start: %s", callsignAtStart ? "yes" : "no");
|
||||||
LogInfo(" Callsign At End: %s", callsignAtEnd ? "yes" : "no");
|
LogInfo(" Callsign At End: %s", callsignAtEnd ? "yes" : "no");
|
||||||
LogInfo(" Ack: %s", ack.c_str());
|
LogInfo(" RF Ack: %s", rfAck.c_str());
|
||||||
|
LogInfo(" Net Ack: %s", netAck.c_str());
|
||||||
LogInfo(" Ack Speed: %uWPM", ackSpeed);
|
LogInfo(" Ack Speed: %uWPM", ackSpeed);
|
||||||
LogInfo(" Ack Frequency: %uHz", ackFrequency);
|
LogInfo(" Ack Frequency: %uHz", ackFrequency);
|
||||||
LogInfo(" Ack Delay: %ums", ackDelay);
|
LogInfo(" Ack Delay: %ums", ackDelay);
|
||||||
@@ -653,7 +655,7 @@ int CMMDVMHost::run()
|
|||||||
LogInfo(" Hang Time: %us", hangTime);
|
LogInfo(" Hang Time: %us", hangTime);
|
||||||
|
|
||||||
m_modem->setFMCallsignParams(callsign, callsignSpeed, callsignFrequency, callsignTime, callsignHoldoff, callsignHighLevel, callsignLowLevel, callsignAtStart, callsignAtEnd);
|
m_modem->setFMCallsignParams(callsign, callsignSpeed, callsignFrequency, callsignTime, callsignHoldoff, callsignHighLevel, callsignLowLevel, callsignAtStart, callsignAtEnd);
|
||||||
m_modem->setFMAckParams(ack, ackSpeed, ackFrequency, ackDelay, ackLevel);
|
m_modem->setFMAckParams(rfAck, ackSpeed, ackFrequency, ackDelay, ackLevel);
|
||||||
m_modem->setFMMiscParams(timeout, timeoutLevel, ctcssFrequency, ctcssThreshold, ctcssLevel, kerchunkTime, hangTime);
|
m_modem->setFMMiscParams(timeout, timeoutLevel, ctcssFrequency, ctcssThreshold, ctcssLevel, kerchunkTime, hangTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user