Merge pull request #2 from g4klx/master
update to latest from master repo
This commit is contained in:
commit
960e4d8d98
31
Conf.cpp
31
Conf.cpp
|
@ -90,7 +90,6 @@ m_modemDStarTXLevel(50U),
|
||||||
m_modemDMRTXLevel(50U),
|
m_modemDMRTXLevel(50U),
|
||||||
m_modemYSFTXLevel(50U),
|
m_modemYSFTXLevel(50U),
|
||||||
m_modemP25TXLevel(50U),
|
m_modemP25TXLevel(50U),
|
||||||
m_modemOscOffset(0),
|
|
||||||
m_modemRSSIMappingFile(),
|
m_modemRSSIMappingFile(),
|
||||||
m_modemSamplesDir(),
|
m_modemSamplesDir(),
|
||||||
m_modemDebug(false),
|
m_modemDebug(false),
|
||||||
|
@ -194,7 +193,7 @@ bool CConf::read()
|
||||||
|
|
||||||
if (buffer[0U] == '[') {
|
if (buffer[0U] == '[') {
|
||||||
if (::strncmp(buffer, "[General]", 9U) == 0)
|
if (::strncmp(buffer, "[General]", 9U) == 0)
|
||||||
section = SECTION_GENERAL;
|
section = SECTION_GENERAL;
|
||||||
else if (::strncmp(buffer, "[Info]", 6U) == 0)
|
else if (::strncmp(buffer, "[Info]", 6U) == 0)
|
||||||
section = SECTION_INFO;
|
section = SECTION_INFO;
|
||||||
else if (::strncmp(buffer, "[Log]", 5U) == 0)
|
else if (::strncmp(buffer, "[Log]", 5U) == 0)
|
||||||
|
@ -217,9 +216,9 @@ bool CConf::read()
|
||||||
section = SECTION_P25;
|
section = SECTION_P25;
|
||||||
else if (::strncmp(buffer, "[D-Star Network]", 16U) == 0)
|
else if (::strncmp(buffer, "[D-Star Network]", 16U) == 0)
|
||||||
section = SECTION_DSTAR_NETWORK;
|
section = SECTION_DSTAR_NETWORK;
|
||||||
else if (::strncmp(buffer, "[DMR Network]", 13U) == 0)
|
else if (::strncmp(buffer, "[DMR Network]", 13U) == 0)
|
||||||
section = SECTION_DMR_NETWORK;
|
section = SECTION_DMR_NETWORK;
|
||||||
else if (::strncmp(buffer, "[System Fusion Network]", 23U) == 0)
|
else if (::strncmp(buffer, "[System Fusion Network]", 23U) == 0)
|
||||||
section = SECTION_FUSION_NETWORK;
|
section = SECTION_FUSION_NETWORK;
|
||||||
else if (::strncmp(buffer, "[P25 Network]", 13U) == 0)
|
else if (::strncmp(buffer, "[P25 Network]", 13U) == 0)
|
||||||
section = SECTION_P25_NETWORK;
|
section = SECTION_P25_NETWORK;
|
||||||
|
@ -236,15 +235,18 @@ bool CConf::read()
|
||||||
else
|
else
|
||||||
section = SECTION_NONE;
|
section = SECTION_NONE;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* key = ::strtok(buffer, " \t=\r\n");
|
char* key = ::strtok(buffer, " \t=\r\n");
|
||||||
if (key == NULL)
|
if (key == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
char* value = ::strtok(NULL, "\r\n");
|
char* value = ::strtok(NULL, "\r\n");
|
||||||
if (section == SECTION_GENERAL) {
|
if (value == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (section == SECTION_GENERAL) {
|
||||||
if (::strcmp(key, "Callsign") == 0) {
|
if (::strcmp(key, "Callsign") == 0) {
|
||||||
// Convert the callsign to upper case
|
// Convert the callsign to upper case
|
||||||
for (unsigned int i = 0U; value[i] != 0; i++)
|
for (unsigned int i = 0U; value[i] != 0; i++)
|
||||||
|
@ -329,8 +331,6 @@ bool CConf::read()
|
||||||
m_modemYSFTXLevel = (unsigned int)::atoi(value);
|
m_modemYSFTXLevel = (unsigned int)::atoi(value);
|
||||||
else if (::strcmp(key, "P25TXLevel") == 0)
|
else if (::strcmp(key, "P25TXLevel") == 0)
|
||||||
m_modemP25TXLevel = (unsigned int)::atoi(value);
|
m_modemP25TXLevel = (unsigned int)::atoi(value);
|
||||||
else if (::strcmp(key, "OscOffset") == 0)
|
|
||||||
m_modemOscOffset = ::atoi(value);
|
|
||||||
else if (::strcmp(key, "RSSIMappingFile") == 0)
|
else if (::strcmp(key, "RSSIMappingFile") == 0)
|
||||||
m_modemRSSIMappingFile = value;
|
m_modemRSSIMappingFile = value;
|
||||||
else if (::strcmp(key, "SamplesDir") == 0)
|
else if (::strcmp(key, "SamplesDir") == 0)
|
||||||
|
@ -742,11 +742,6 @@ unsigned int CConf::getModemP25TXLevel() const
|
||||||
return m_modemP25TXLevel;
|
return m_modemP25TXLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CConf::getModemOscOffset() const
|
|
||||||
{
|
|
||||||
return m_modemOscOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string CConf::getModemRSSIMappingFile () const
|
std::string CConf::getModemRSSIMappingFile () const
|
||||||
{
|
{
|
||||||
return m_modemRSSIMappingFile;
|
return m_modemRSSIMappingFile;
|
||||||
|
|
2
Conf.h
2
Conf.h
|
@ -77,7 +77,6 @@ public:
|
||||||
unsigned int getModemDMRTXLevel() const;
|
unsigned int getModemDMRTXLevel() const;
|
||||||
unsigned int getModemYSFTXLevel() const;
|
unsigned int getModemYSFTXLevel() const;
|
||||||
unsigned int getModemP25TXLevel() const;
|
unsigned int getModemP25TXLevel() const;
|
||||||
int getModemOscOffset() const;
|
|
||||||
std::string getModemRSSIMappingFile() const;
|
std::string getModemRSSIMappingFile() const;
|
||||||
std::string getModemSamplesDir() const;
|
std::string getModemSamplesDir() const;
|
||||||
bool getModemDebug() const;
|
bool getModemDebug() const;
|
||||||
|
@ -230,7 +229,6 @@ private:
|
||||||
unsigned int m_modemDMRTXLevel;
|
unsigned int m_modemDMRTXLevel;
|
||||||
unsigned int m_modemYSFTXLevel;
|
unsigned int m_modemYSFTXLevel;
|
||||||
unsigned int m_modemP25TXLevel;
|
unsigned int m_modemP25TXLevel;
|
||||||
int m_modemOscOffset;
|
|
||||||
std::string m_modemRSSIMappingFile;
|
std::string m_modemRSSIMappingFile;
|
||||||
std::string m_modemSamplesDir;
|
std::string m_modemSamplesDir;
|
||||||
bool m_modemDebug;
|
bool m_modemDebug;
|
||||||
|
|
|
@ -2,9 +2,6 @@ D-Star: No obvious issues.
|
||||||
|
|
||||||
DMR: There is an issue where transmitted data (text messages) isn’t picked up as reliably from an MMDVM than (say) a Hytera repeater. In order to address this, I need to see a trace from a Hytera repeater transmitting text, both from cold (no tx) and when already running. The DMRRX receiver from the DV4RX code in my GitHub repository would do the job, provided you have a DV4mini and a repeater within range.
|
DMR: There is an issue where transmitted data (text messages) isn’t picked up as reliably from an MMDVM than (say) a Hytera repeater. In order to address this, I need to see a trace from a Hytera repeater transmitting text, both from cold (no tx) and when already running. The DMRRX receiver from the DV4RX code in my GitHub repository would do the job, provided you have a DV4mini and a repeater within range.
|
||||||
|
|
||||||
YSF: There are a number of issues that need addressing:
|
YSF: There is an issue that need addressing: The data sent to aprs.fi from southern hemisphere users isn’t always correct. Maybe the GPS format used by YSF still has some secrets to reveal.
|
||||||
1. At the end of a transmission, my radio does a nice bleep when it’s listening to a DR-1X but not when receiving from my MMDVM. I don’t know why. I think the YSFRX from DV4RX may be able to give the answer.
|
|
||||||
2. The data sent to aprs.fi from southern hemisphere users isn’t always correct. Maybe the GPS format used by YSF still has some secrets to reveal.
|
|
||||||
3. The last page of Wires-X data doesn’t display. A trace of a complete listing from a “real” Wires-X system, right down to the last page would be useful. Yet again the YSFRX would be useful here.
|
|
||||||
|
|
||||||
P25: No obvious issues.
|
P25: No obvious issues.
|
||||||
|
|
|
@ -49,7 +49,6 @@ TXLevel=50
|
||||||
# DMRTXLevel=50
|
# DMRTXLevel=50
|
||||||
# YSFTXLevel=50
|
# YSFTXLevel=50
|
||||||
# P25TXLevel=50
|
# P25TXLevel=50
|
||||||
OscOffset=0
|
|
||||||
RSSIMappingFile=RSSI.dat
|
RSSIMappingFile=RSSI.dat
|
||||||
SamplesDir=.
|
SamplesDir=.
|
||||||
Debug=0
|
Debug=0
|
||||||
|
|
|
@ -796,7 +796,6 @@ bool CMMDVMHost::createModem()
|
||||||
unsigned int colorCode = m_conf.getDMRColorCode();
|
unsigned int colorCode = m_conf.getDMRColorCode();
|
||||||
unsigned int rxFrequency = m_conf.getRxFrequency();
|
unsigned int rxFrequency = m_conf.getRxFrequency();
|
||||||
unsigned int txFrequency = m_conf.getTxFrequency();
|
unsigned int txFrequency = m_conf.getTxFrequency();
|
||||||
int oscOffset = m_conf.getModemOscOffset();
|
|
||||||
std::string samplesDir = m_conf.getModemSamplesDir();
|
std::string samplesDir = m_conf.getModemSamplesDir();
|
||||||
|
|
||||||
LogInfo("Modem Parameters");
|
LogInfo("Modem Parameters");
|
||||||
|
@ -814,9 +813,8 @@ bool CMMDVMHost::createModem()
|
||||||
LogInfo(" P25 TX Level: %u%%", p25TXLevel);
|
LogInfo(" P25 TX Level: %u%%", p25TXLevel);
|
||||||
LogInfo(" RX Frequency: %uHz", rxFrequency);
|
LogInfo(" RX Frequency: %uHz", rxFrequency);
|
||||||
LogInfo(" TX Frequency: %uHz", txFrequency);
|
LogInfo(" TX Frequency: %uHz", txFrequency);
|
||||||
LogInfo(" Osc. Offset: %dppm", oscOffset);
|
|
||||||
|
|
||||||
m_modem = new CModem(port, m_duplex, rxInvert, txInvert, pttInvert, txDelay, dmrDelay, oscOffset, samplesDir, debug);
|
m_modem = new CModem(port, m_duplex, rxInvert, txInvert, pttInvert, txDelay, dmrDelay, samplesDir, debug);
|
||||||
m_modem->setModeParams(m_dstarEnabled, m_dmrEnabled, m_ysfEnabled, m_p25Enabled);
|
m_modem->setModeParams(m_dstarEnabled, m_dmrEnabled, m_ysfEnabled, m_p25Enabled);
|
||||||
m_modem->setLevels(rxLevel, cwIdTXLevel, dstarTXLevel, dmrTXLevel, ysfTXLevel, p25TXLevel);
|
m_modem->setLevels(rxLevel, cwIdTXLevel, dstarTXLevel, dmrTXLevel, ysfTXLevel, p25TXLevel);
|
||||||
m_modem->setRFParams(rxFrequency, txFrequency);
|
m_modem->setRFParams(rxFrequency, txFrequency);
|
||||||
|
@ -1268,7 +1266,7 @@ void CMMDVMHost::setMode(unsigned char mode)
|
||||||
m_modem->setMode(MODE_IDLE);
|
m_modem->setMode(MODE_IDLE);
|
||||||
if (m_ump != NULL)
|
if (m_ump != NULL)
|
||||||
m_ump->setMode(MODE_IDLE);
|
m_ump->setMode(MODE_IDLE);
|
||||||
if (m_mode == MODE_ERROR || m_mode == MODE_LOCKOUT) {
|
if (m_mode == MODE_ERROR) {
|
||||||
m_modem->sendCWId(m_callsign);
|
m_modem->sendCWId(m_callsign);
|
||||||
m_cwIdTimer.setTimeout(m_cwIdTime);
|
m_cwIdTimer.setTimeout(m_cwIdTime);
|
||||||
m_cwIdTimer.start();
|
m_cwIdTimer.start();
|
||||||
|
|
|
@ -85,7 +85,7 @@ const unsigned int MAX_RESPONSES = 30U;
|
||||||
const unsigned int BUFFER_LENGTH = 2000U;
|
const unsigned int BUFFER_LENGTH = 2000U;
|
||||||
|
|
||||||
|
|
||||||
CModem::CModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, int oscOffset, const std::string& samplesDir, bool debug) :
|
CModem::CModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, const std::string& samplesDir, bool debug) :
|
||||||
m_port(port),
|
m_port(port),
|
||||||
m_colorCode(0U),
|
m_colorCode(0U),
|
||||||
m_duplex(duplex),
|
m_duplex(duplex),
|
||||||
|
@ -100,7 +100,6 @@ m_dstarTXLevel(0U),
|
||||||
m_dmrTXLevel(0U),
|
m_dmrTXLevel(0U),
|
||||||
m_ysfTXLevel(0U),
|
m_ysfTXLevel(0U),
|
||||||
m_p25TXLevel(0U),
|
m_p25TXLevel(0U),
|
||||||
m_oscOffset(oscOffset),
|
|
||||||
m_samplesDir(samplesDir),
|
m_samplesDir(samplesDir),
|
||||||
m_debug(debug),
|
m_debug(debug),
|
||||||
m_rxFrequency(0U),
|
m_rxFrequency(0U),
|
||||||
|
@ -980,7 +979,7 @@ bool CModem::setConfig()
|
||||||
|
|
||||||
buffer[10U] = m_dmrDelay;
|
buffer[10U] = m_dmrDelay;
|
||||||
|
|
||||||
buffer[11U] = (unsigned char)(m_oscOffset + 128);
|
buffer[11U] = 128U; // Was OscOffset
|
||||||
|
|
||||||
buffer[12U] = (m_dstarTXLevel * 255U) / 100U;
|
buffer[12U] = (m_dstarTXLevel * 255U) / 100U;
|
||||||
buffer[13U] = (m_dmrTXLevel * 255U) / 100U;
|
buffer[13U] = (m_dmrTXLevel * 255U) / 100U;
|
||||||
|
|
3
Modem.h
3
Modem.h
|
@ -34,7 +34,7 @@ enum RESP_TYPE_MMDVM {
|
||||||
|
|
||||||
class CModem {
|
class CModem {
|
||||||
public:
|
public:
|
||||||
CModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, int oscOffset, const std::string& samplesDir, bool debug = false);
|
CModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, const std::string& samplesDir, bool debug = false);
|
||||||
~CModem();
|
~CModem();
|
||||||
|
|
||||||
void setRFParams(unsigned int rxFrequency, unsigned int txFrequency);
|
void setRFParams(unsigned int rxFrequency, unsigned int txFrequency);
|
||||||
|
@ -101,7 +101,6 @@ private:
|
||||||
unsigned int m_dmrTXLevel;
|
unsigned int m_dmrTXLevel;
|
||||||
unsigned int m_ysfTXLevel;
|
unsigned int m_ysfTXLevel;
|
||||||
unsigned int m_p25TXLevel;
|
unsigned int m_p25TXLevel;
|
||||||
int m_oscOffset;
|
|
||||||
std::string m_samplesDir;
|
std::string m_samplesDir;
|
||||||
bool m_debug;
|
bool m_debug;
|
||||||
unsigned int m_rxFrequency;
|
unsigned int m_rxFrequency;
|
||||||
|
|
Loading…
Reference in a new issue