mirror of
https://github.com/ShaYmez/MMDVM_CM.git
synced 2024-11-18 22:21:45 -05:00
Fix for XLX "echo back" bug in YSF2DMR
This commit is contained in:
parent
e565a996f8
commit
3a7ba11a9b
@ -20,6 +20,6 @@
|
|||||||
#if !defined(VERSION_H)
|
#if !defined(VERSION_H)
|
||||||
#define VERSION_H
|
#define VERSION_H
|
||||||
|
|
||||||
const char* VERSION = "20180905";
|
const char* VERSION = "20180923";
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -144,7 +144,8 @@ m_xlxConnected(false),
|
|||||||
m_xlxReflectors(NULL),
|
m_xlxReflectors(NULL),
|
||||||
m_xlxrefl(0U),
|
m_xlxrefl(0U),
|
||||||
m_remoteGateway(false),
|
m_remoteGateway(false),
|
||||||
m_hangTime(1000U)
|
m_hangTime(1000U),
|
||||||
|
m_firstSync(false)
|
||||||
{
|
{
|
||||||
m_ysfFrame = new unsigned char[200U];
|
m_ysfFrame = new unsigned char[200U];
|
||||||
m_dmrFrame = new unsigned char[50U];
|
m_dmrFrame = new unsigned char[50U];
|
||||||
@ -774,6 +775,14 @@ int CYSF2DMR::run()
|
|||||||
networkWatchdog.start();
|
networkWatchdog.start();
|
||||||
|
|
||||||
if(DataType == DT_TERMINATOR_WITH_LC) {
|
if(DataType == DT_TERMINATOR_WITH_LC) {
|
||||||
|
if (m_dmrFrames == 0U) {
|
||||||
|
m_dmrNetwork->reset(2U);
|
||||||
|
networkWatchdog.stop();
|
||||||
|
m_dmrinfo = false;
|
||||||
|
m_firstSync = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
LogMessage("DMR received end of voice transmission, %.1f seconds", float(m_dmrFrames) / 16.667F);
|
LogMessage("DMR received end of voice transmission, %.1f seconds", float(m_dmrFrames) / 16.667F);
|
||||||
|
|
||||||
if (SrcId == 4000)
|
if (SrcId == 4000)
|
||||||
@ -784,6 +793,7 @@ int CYSF2DMR::run()
|
|||||||
networkWatchdog.stop();
|
networkWatchdog.stop();
|
||||||
m_dmrFrames = 0U;
|
m_dmrFrames = 0U;
|
||||||
m_dmrinfo = false;
|
m_dmrinfo = false;
|
||||||
|
m_firstSync = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((DataType == DT_VOICE_LC_HEADER) && (DataType != m_dmrLastDT)) {
|
if((DataType == DT_VOICE_LC_HEADER) && (DataType != m_dmrLastDT)) {
|
||||||
@ -828,7 +838,10 @@ int CYSF2DMR::run()
|
|||||||
m_dmrFrames = 0U;
|
m_dmrFrames = 0U;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(DataType == DT_VOICE_SYNC || DataType == DT_VOICE) {
|
if(DataType == DT_VOICE_SYNC)
|
||||||
|
m_firstSync = true;
|
||||||
|
|
||||||
|
if((DataType == DT_VOICE_SYNC || DataType == DT_VOICE) && m_firstSync) {
|
||||||
unsigned char dmr_frame[50];
|
unsigned char dmr_frame[50];
|
||||||
|
|
||||||
tx_dmrdata.getData(dmr_frame);
|
tx_dmrdata.getData(dmr_frame);
|
||||||
@ -845,7 +858,7 @@ int CYSF2DMR::run()
|
|||||||
|
|
||||||
m_netDst = (netflco == FLCO_GROUP ? "TG " : "") + m_lookup->findCS(DstId);
|
m_netDst = (netflco == FLCO_GROUP ? "TG " : "") + m_lookup->findCS(DstId);
|
||||||
|
|
||||||
LogMessage("DMR audio received from %s to %s", m_netSrc.c_str(), m_netDst.c_str());
|
LogMessage("DMR audio late entry received from %s to %s", m_netSrc.c_str(), m_netDst.c_str());
|
||||||
|
|
||||||
if (m_lookup->exists(SrcId) && (m_APRS != NULL)) {
|
if (m_lookup->exists(SrcId) && (m_APRS != NULL)) {
|
||||||
int lat, lon, resp;
|
int lat, lon, resp;
|
||||||
|
@ -106,6 +106,7 @@ private:
|
|||||||
unsigned int m_xlxrefl;
|
unsigned int m_xlxrefl;
|
||||||
bool m_remoteGateway;
|
bool m_remoteGateway;
|
||||||
unsigned int m_hangTime;
|
unsigned int m_hangTime;
|
||||||
|
bool m_firstSync;
|
||||||
|
|
||||||
bool createDMRNetwork();
|
bool createDMRNetwork();
|
||||||
void createGPS();
|
void createGPS();
|
||||||
|
Loading…
Reference in New Issue
Block a user