Merge pull request #2 from g4klx/master

update to latest from master repo
This commit is contained in:
George Smart 2017-03-09 17:28:17 +00:00 committed by GitHub
commit 960e4d8d98
7 changed files with 19 additions and 34 deletions

View file

@ -90,7 +90,6 @@ m_modemDStarTXLevel(50U),
m_modemDMRTXLevel(50U),
m_modemYSFTXLevel(50U),
m_modemP25TXLevel(50U),
m_modemOscOffset(0),
m_modemRSSIMappingFile(),
m_modemSamplesDir(),
m_modemDebug(false),
@ -194,7 +193,7 @@ bool CConf::read()
if (buffer[0U] == '[') {
if (::strncmp(buffer, "[General]", 9U) == 0)
section = SECTION_GENERAL;
section = SECTION_GENERAL;
else if (::strncmp(buffer, "[Info]", 6U) == 0)
section = SECTION_INFO;
else if (::strncmp(buffer, "[Log]", 5U) == 0)
@ -217,9 +216,9 @@ bool CConf::read()
section = SECTION_P25;
else if (::strncmp(buffer, "[D-Star Network]", 16U) == 0)
section = SECTION_DSTAR_NETWORK;
else if (::strncmp(buffer, "[DMR Network]", 13U) == 0)
else if (::strncmp(buffer, "[DMR Network]", 13U) == 0)
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;
else if (::strncmp(buffer, "[P25 Network]", 13U) == 0)
section = SECTION_P25_NETWORK;
@ -236,15 +235,18 @@ bool CConf::read()
else
section = SECTION_NONE;
continue;
}
continue;
}
char* key = ::strtok(buffer, " \t=\r\n");
if (key == NULL)
continue;
char* key = ::strtok(buffer, " \t=\r\n");
if (key == NULL)
continue;
char* value = ::strtok(NULL, "\r\n");
if (section == SECTION_GENERAL) {
char* value = ::strtok(NULL, "\r\n");
if (value == NULL)
continue;
if (section == SECTION_GENERAL) {
if (::strcmp(key, "Callsign") == 0) {
// Convert the callsign to upper case
for (unsigned int i = 0U; value[i] != 0; i++)
@ -329,8 +331,6 @@ bool CConf::read()
m_modemYSFTXLevel = (unsigned int)::atoi(value);
else if (::strcmp(key, "P25TXLevel") == 0)
m_modemP25TXLevel = (unsigned int)::atoi(value);
else if (::strcmp(key, "OscOffset") == 0)
m_modemOscOffset = ::atoi(value);
else if (::strcmp(key, "RSSIMappingFile") == 0)
m_modemRSSIMappingFile = value;
else if (::strcmp(key, "SamplesDir") == 0)
@ -742,11 +742,6 @@ unsigned int CConf::getModemP25TXLevel() const
return m_modemP25TXLevel;
}
int CConf::getModemOscOffset() const
{
return m_modemOscOffset;
}
std::string CConf::getModemRSSIMappingFile () const
{
return m_modemRSSIMappingFile;

2
Conf.h
View file

@ -77,7 +77,6 @@ public:
unsigned int getModemDMRTXLevel() const;
unsigned int getModemYSFTXLevel() const;
unsigned int getModemP25TXLevel() const;
int getModemOscOffset() const;
std::string getModemRSSIMappingFile() const;
std::string getModemSamplesDir() const;
bool getModemDebug() const;
@ -230,7 +229,6 @@ private:
unsigned int m_modemDMRTXLevel;
unsigned int m_modemYSFTXLevel;
unsigned int m_modemP25TXLevel;
int m_modemOscOffset;
std::string m_modemRSSIMappingFile;
std::string m_modemSamplesDir;
bool m_modemDebug;

View file

@ -2,9 +2,6 @@ D-Star: No obvious issues.
DMR: There is an issue where transmitted data (text messages) isnt 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:
1. At the end of a transmission, my radio does a nice bleep when its listening to a DR-1X but not when receiving from my MMDVM. I dont 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 isnt always correct. Maybe the GPS format used by YSF still has some secrets to reveal.
3. The last page of Wires-X data doesnt 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.
YSF: There is an issue that need addressing: The data sent to aprs.fi from southern hemisphere users isnt always correct. Maybe the GPS format used by YSF still has some secrets to reveal.
P25: No obvious issues.

View file

@ -49,7 +49,6 @@ TXLevel=50
# DMRTXLevel=50
# YSFTXLevel=50
# P25TXLevel=50
OscOffset=0
RSSIMappingFile=RSSI.dat
SamplesDir=.
Debug=0

View file

@ -796,7 +796,6 @@ bool CMMDVMHost::createModem()
unsigned int colorCode = m_conf.getDMRColorCode();
unsigned int rxFrequency = m_conf.getRxFrequency();
unsigned int txFrequency = m_conf.getTxFrequency();
int oscOffset = m_conf.getModemOscOffset();
std::string samplesDir = m_conf.getModemSamplesDir();
LogInfo("Modem Parameters");
@ -814,9 +813,8 @@ bool CMMDVMHost::createModem()
LogInfo(" P25 TX Level: %u%%", p25TXLevel);
LogInfo(" RX Frequency: %uHz", rxFrequency);
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->setLevels(rxLevel, cwIdTXLevel, dstarTXLevel, dmrTXLevel, ysfTXLevel, p25TXLevel);
m_modem->setRFParams(rxFrequency, txFrequency);
@ -1268,7 +1266,7 @@ void CMMDVMHost::setMode(unsigned char mode)
m_modem->setMode(MODE_IDLE);
if (m_ump != NULL)
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_cwIdTimer.setTimeout(m_cwIdTime);
m_cwIdTimer.start();

View file

@ -85,7 +85,7 @@ const unsigned int MAX_RESPONSES = 30U;
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_colorCode(0U),
m_duplex(duplex),
@ -100,7 +100,6 @@ m_dstarTXLevel(0U),
m_dmrTXLevel(0U),
m_ysfTXLevel(0U),
m_p25TXLevel(0U),
m_oscOffset(oscOffset),
m_samplesDir(samplesDir),
m_debug(debug),
m_rxFrequency(0U),
@ -980,7 +979,7 @@ bool CModem::setConfig()
buffer[10U] = m_dmrDelay;
buffer[11U] = (unsigned char)(m_oscOffset + 128);
buffer[11U] = 128U; // Was OscOffset
buffer[12U] = (m_dstarTXLevel * 255U) / 100U;
buffer[13U] = (m_dmrTXLevel * 255U) / 100U;

View file

@ -34,7 +34,7 @@ enum RESP_TYPE_MMDVM {
class CModem {
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();
void setRFParams(unsigned int rxFrequency, unsigned int txFrequency);
@ -101,7 +101,6 @@ private:
unsigned int m_dmrTXLevel;
unsigned int m_ysfTXLevel;
unsigned int m_p25TXLevel;
int m_oscOffset;
std::string m_samplesDir;
bool m_debug;
unsigned int m_rxFrequency;