mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2025-12-06 05:32:00 +01:00
Pass the net ack text to the modem.
This commit is contained in:
parent
1f17aec1f1
commit
960a60f382
|
|
@ -658,7 +658,7 @@ int CMMDVMHost::run()
|
|||
|
||||
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);
|
||||
m_modem->setFMMiscParams(netAck, timeout, timeoutLevel, ctcssFrequency, ctcssThreshold, ctcssLevel, kerchunkTime, hangTime);
|
||||
}
|
||||
|
||||
bool remoteControlEnabled = m_conf.getRemoteControlEnabled();
|
||||
|
|
|
|||
22
Modem.cpp
22
Modem.cpp
|
|
@ -1893,12 +1893,12 @@ bool CModem::setFMCallsignParams(const std::string& callsign, unsigned int calls
|
|||
return true;
|
||||
}
|
||||
|
||||
bool CModem::setFMAckParams(const std::string& ack, unsigned int ackSpeed, unsigned int ackFrequency, unsigned int ackMinTime, unsigned int ackDelay, float ackLevel)
|
||||
bool CModem::setFMAckParams(const std::string& rfAck, unsigned int ackSpeed, unsigned int ackFrequency, unsigned int ackMinTime, unsigned int ackDelay, float ackLevel)
|
||||
{
|
||||
assert(m_serial != NULL);
|
||||
|
||||
unsigned char buffer[80U];
|
||||
unsigned char len = 8U + ack.size();
|
||||
unsigned char len = 8U + rfAck.size();
|
||||
|
||||
buffer[0U] = MMDVM_FRAME_START;
|
||||
buffer[1U] = len;
|
||||
|
|
@ -1911,8 +1911,8 @@ bool CModem::setFMAckParams(const std::string& ack, unsigned int ackSpeed, unsig
|
|||
|
||||
buffer[7U] = (unsigned char)(ackLevel * 2.55F + 0.5F);
|
||||
|
||||
for (unsigned int i = 0U; i < ack.size(); i++)
|
||||
buffer[8U + i] = ack.at(i);
|
||||
for (unsigned int i = 0U; i < rfAck.size(); i++)
|
||||
buffer[8U + i] = rfAck.at(i);
|
||||
|
||||
// CUtils::dump(1U, "Written", buffer, len);
|
||||
|
||||
|
|
@ -1945,14 +1945,15 @@ bool CModem::setFMAckParams(const std::string& ack, unsigned int ackSpeed, unsig
|
|||
return true;
|
||||
}
|
||||
|
||||
bool CModem::setFMMiscParams(unsigned int timeout, float timeoutLevel, float ctcssFrequency, float ctcssThreshold, float ctcssLevel, unsigned int kerchunkTime, unsigned int hangTime)
|
||||
bool CModem::setFMMiscParams(const std::string& netAck, unsigned int timeout, float timeoutLevel, float ctcssFrequency, float ctcssThreshold, float ctcssLevel, unsigned int kerchunkTime, unsigned int hangTime)
|
||||
{
|
||||
assert(m_serial != NULL);
|
||||
|
||||
unsigned char buffer[20U];
|
||||
unsigned char len = 10U + netAck.size();
|
||||
|
||||
buffer[0U] = MMDVM_FRAME_START;
|
||||
buffer[1U] = 10U;
|
||||
buffer[1U] = len;
|
||||
buffer[2U] = MMDVM_FM_PARAMS3;
|
||||
|
||||
buffer[3U] = timeout / 5U;
|
||||
|
|
@ -1965,10 +1966,13 @@ bool CModem::setFMMiscParams(unsigned int timeout, float timeoutLevel, float ctc
|
|||
buffer[8U] = kerchunkTime;
|
||||
buffer[9U] = hangTime;
|
||||
|
||||
// CUtils::dump(1U, "Written", buffer, 10U);
|
||||
for (unsigned int i = 0U; i < netAck.size(); i++)
|
||||
buffer[10U + i] = netAck.at(i);
|
||||
|
||||
int ret = m_serial->write(buffer, 10U);
|
||||
if (ret != 10)
|
||||
// CUtils::dump(1U, "Written", buffer, len);
|
||||
|
||||
int ret = m_serial->write(buffer, len);
|
||||
if (ret != len)
|
||||
return false;
|
||||
|
||||
unsigned int count = 0U;
|
||||
|
|
|
|||
4
Modem.h
4
Modem.h
|
|
@ -46,8 +46,8 @@ public:
|
|||
virtual void setTransparentDataParams(unsigned int sendFrameType);
|
||||
|
||||
virtual bool 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 bool setFMAckParams(const std::string& ack, unsigned int ackSpeed, unsigned int ackFrequency, unsigned int minTime, unsigned int ackDelay, float ackLevel);
|
||||
virtual bool setFMMiscParams(unsigned int timeout, float timeoutLevel, float ctcssFrequency, float ctcssThreshold, float ctcssLevel, unsigned int kerchunkTime, unsigned int hangTime);
|
||||
virtual bool setFMAckParams(const std::string& rfAck, unsigned int ackSpeed, unsigned int ackFrequency, unsigned int minTime, unsigned int ackDelay, float ackLevel);
|
||||
virtual bool setFMMiscParams(const std::string& netAck, unsigned int timeout, float timeoutLevel, float ctcssFrequency, float ctcssThreshold, float ctcssLevel, unsigned int kerchunkTime, unsigned int hangTime);
|
||||
|
||||
virtual bool open();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue