Allow for a seperate FM timeout value.

This commit is contained in:
Jonathan Naylor
2020-04-15 14:14:38 +01:00
parent 960a60f382
commit f8bce3823a
5 changed files with 14 additions and 3 deletions

View File

@@ -190,6 +190,7 @@ m_fmAckFrequency(1750U),
m_fmAckMinTime(5U), m_fmAckMinTime(5U),
m_fmAckDelay(1000U), m_fmAckDelay(1000U),
m_fmAckLevel(80.0F), m_fmAckLevel(80.0F),
m_fmTimeout(180U),
m_fmTimeoutLevel(80.0F), m_fmTimeoutLevel(80.0F),
m_fmCTCSSFrequency(88.6F), m_fmCTCSSFrequency(88.6F),
m_fmCTCSSThreshold(10.0F), m_fmCTCSSThreshold(10.0F),
@@ -391,7 +392,7 @@ bool CConf::read()
} else if (::strcmp(key, "Id") == 0) } else if (::strcmp(key, "Id") == 0)
m_id = m_p25Id = m_dmrId = (unsigned int)::atoi(value); m_id = m_p25Id = m_dmrId = (unsigned int)::atoi(value);
else if (::strcmp(key, "Timeout") == 0) else if (::strcmp(key, "Timeout") == 0)
m_timeout = (unsigned int)::atoi(value); m_fmTimeout = m_timeout = (unsigned int)::atoi(value);
else if (::strcmp(key, "Duplex") == 0) else if (::strcmp(key, "Duplex") == 0)
m_duplex = ::atoi(value) == 1; m_duplex = ::atoi(value) == 1;
else if (::strcmp(key, "ModeHang") == 0) else if (::strcmp(key, "ModeHang") == 0)
@@ -734,6 +735,8 @@ bool CConf::read()
m_fmAckDelay = (unsigned int)::atoi(value); m_fmAckDelay = (unsigned int)::atoi(value);
else if (::strcmp(key, "AckLevel") == 0) else if (::strcmp(key, "AckLevel") == 0)
m_fmAckLevel = float(::atof(value)); m_fmAckLevel = float(::atof(value));
else if (::strcmp(key, "Timeout") == 0)
m_fmTimeout = (unsigned int)::atoi(value);
else if (::strcmp(key, "TimeoutLevel") == 0) else if (::strcmp(key, "TimeoutLevel") == 0)
m_fmTimeoutLevel = float(::atof(value)); m_fmTimeoutLevel = float(::atof(value));
else if (::strcmp(key, "CTCSSFrequency") == 0) else if (::strcmp(key, "CTCSSFrequency") == 0)
@@ -1573,6 +1576,11 @@ float CConf::getFMAckLevel() const
return m_fmAckLevel; return m_fmAckLevel;
} }
unsigned int CConf::getFMTimeout() const
{
return m_fmTimeout;
}
float CConf::getFMTimeoutLevel() const float CConf::getFMTimeoutLevel() const
{ {
return m_fmTimeoutLevel; return m_fmTimeoutLevel;

2
Conf.h
View File

@@ -188,6 +188,7 @@ public:
unsigned int getFMAckMinTime() const; unsigned int getFMAckMinTime() const;
unsigned int getFMAckDelay() const; unsigned int getFMAckDelay() const;
float getFMAckLevel() const; float getFMAckLevel() const;
unsigned int getFMTimeout() const;
float getFMTimeoutLevel() const; float getFMTimeoutLevel() const;
float getFMCTCSSFrequency() const; float getFMCTCSSFrequency() const;
float getFMCTCSSThreshold() const; float getFMCTCSSThreshold() const;
@@ -449,6 +450,7 @@ private:
unsigned int m_fmAckMinTime; unsigned int m_fmAckMinTime;
unsigned int m_fmAckDelay; unsigned int m_fmAckDelay;
float m_fmAckLevel; float m_fmAckLevel;
unsigned int m_fmTimeout;
float m_fmTimeoutLevel; float m_fmTimeoutLevel;
float m_fmCTCSSFrequency; float m_fmCTCSSFrequency;
float m_fmCTCSSThreshold; float m_fmCTCSSThreshold;

View File

@@ -158,6 +158,7 @@ AckFrequency=1750
AckMinTime=4 AckMinTime=4
AckDelay=1000 AckDelay=1000
AckLevel=80 AckLevel=80
# Timeout=180
TimeoutLevel=80 TimeoutLevel=80
CTCSSFrequency=88.8 CTCSSFrequency=88.8
CTCSSThreshold=10 CTCSSThreshold=10

View File

@@ -623,7 +623,7 @@ int CMMDVMHost::run()
unsigned int ackMinTime = m_conf.getFMAckMinTime(); unsigned int ackMinTime = m_conf.getFMAckMinTime();
unsigned int ackDelay = m_conf.getFMAckDelay(); unsigned int ackDelay = m_conf.getFMAckDelay();
float ackLevel = m_conf.getFMAckLevel(); float ackLevel = m_conf.getFMAckLevel();
unsigned int timeout = m_conf.getTimeout(); unsigned int timeout = m_conf.getFMTimeout();
float timeoutLevel = m_conf.getFMTimeoutLevel(); float timeoutLevel = m_conf.getFMTimeoutLevel();
float ctcssFrequency = m_conf.getFMCTCSSFrequency(); float ctcssFrequency = m_conf.getFMCTCSSFrequency();
float ctcssThreshold = m_conf.getFMCTCSSThreshold(); float ctcssThreshold = m_conf.getFMCTCSSThreshold();

View File

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