diff --git a/Conf.cpp b/Conf.cpp index 1e14523..85972c1 100644 --- a/Conf.cpp +++ b/Conf.cpp @@ -113,6 +113,7 @@ m_modemP25TXLevel(50.0F), m_modemNXDNTXLevel(50.0F), m_modemPOCSAGTXLevel(50.0F), m_modemFMTXLevel(50.0F), +m_modemAX25TXLevel(50.0F), m_modemRSSIMappingFile(), m_modemTrace(false), m_modemDebug(false), @@ -208,6 +209,9 @@ m_fmRFAudioBoost(1U), m_fmMaxDevLevel(90.0F), m_fmExtAudioBoost(1U), m_ax25Enabled(false), +m_ax25RXTwist(6), +m_ax25TXTwist(6), +m_ax25Digipeat(true), m_ax25Trace(false), m_dstarNetworkEnabled(false), m_dstarGatewayAddress(), @@ -508,7 +512,7 @@ bool CConf::read() else if (::strcmp(key, "RXLevel") == 0) m_modemRXLevel = float(::atof(value)); else if (::strcmp(key, "TXLevel") == 0) - m_modemFMTXLevel = m_modemCWIdTXLevel = m_modemDStarTXLevel = m_modemDMRTXLevel = m_modemYSFTXLevel = m_modemP25TXLevel = m_modemNXDNTXLevel = float(::atof(value)); + m_modemAX25TXLevel = m_modemFMTXLevel = m_modemCWIdTXLevel = m_modemDStarTXLevel = m_modemDMRTXLevel = m_modemYSFTXLevel = m_modemP25TXLevel = m_modemNXDNTXLevel = float(::atof(value)); else if (::strcmp(key, "CWIdTXLevel") == 0) m_modemCWIdTXLevel = float(::atof(value)); else if (::strcmp(key, "D-StarTXLevel") == 0) @@ -525,6 +529,8 @@ bool CConf::read() m_modemPOCSAGTXLevel = float(::atof(value)); else if (::strcmp(key, "FMTXLevel") == 0) m_modemFMTXLevel = float(::atof(value)); + else if (::strcmp(key, "AX25TXLevel") == 0) + m_modemAX25TXLevel = float(::atof(value)); else if (::strcmp(key, "RSSIMappingFile") == 0) m_modemRSSIMappingFile = value; else if (::strcmp(key, "Trace") == 0) @@ -792,6 +798,12 @@ bool CConf::read() } else if (section == SECTION_AX25) { if (::strcmp(key, "Enable") == 0) m_ax25Enabled = ::atoi(value) == 1; + else if (::strcmp(key, "RXTwist") == 0) + m_ax25RXTwist = ::atoi(value); + else if (::strcmp(key, "TXTwist") == 0) + m_ax25TXTwist = ::atoi(value); + else if (::strcmp(key, "Digipeat") == 0) + m_ax25Digipeat = ::atoi(value) == 1; else if (::strcmp(key, "Trace") == 0) m_ax25Trace = ::atoi(value) == 1; } else if (section == SECTION_DSTAR_NETWORK) { @@ -1241,6 +1253,11 @@ float CConf::getModemFMTXLevel() const return m_modemFMTXLevel; } +float CConf::getModemAX25TXLevel() const +{ + return m_modemAX25TXLevel; +} + std::string CConf::getModemRSSIMappingFile () const { return m_modemRSSIMappingFile; @@ -1716,6 +1733,21 @@ bool CConf::getAX25Enabled() const return m_ax25Enabled; } +int CConf::getAX25RXTwist() const +{ + return m_ax25RXTwist; +} + +int CConf::getAX25TXTwist() const +{ + return m_ax25TXTwist; +} + +bool CConf::getAX25Digipeat() const +{ + return m_ax25Digipeat; +} + bool CConf::getAX25Trace() const { return m_ax25Trace; diff --git a/Conf.h b/Conf.h index 0d340f9..8379061 100644 --- a/Conf.h +++ b/Conf.h @@ -91,6 +91,7 @@ public: float getModemNXDNTXLevel() const; float getModemPOCSAGTXLevel() const; float getModemFMTXLevel() const; + float getModemAX25TXLevel() const; std::string getModemRSSIMappingFile() const; bool getModemTrace() const; bool getModemDebug() const; @@ -173,6 +174,9 @@ public: // The AX.25 section bool getAX25Enabled() const; + int getAX25RXTwist() const; + int getAX25TXTwist() const; + bool getAX25Digipeat() const; bool getAX25Trace() const; // The FM Section @@ -383,6 +387,7 @@ private: float m_modemNXDNTXLevel; float m_modemPOCSAGTXLevel; float m_modemFMTXLevel; + float m_modemAX25TXLevel; std::string m_modemRSSIMappingFile; bool m_modemTrace; bool m_modemDebug; @@ -456,6 +461,9 @@ private: unsigned int m_pocsagFrequency; bool m_ax25Enabled; + int m_ax25RXTwist; + int m_ax25TXTwist; + bool m_ax25Digipeat; bool m_ax25Trace; bool m_fmEnabled; diff --git a/MMDVMHost.cpp b/MMDVMHost.cpp index 9c452dc..db24632 100644 --- a/MMDVMHost.cpp +++ b/MMDVMHost.cpp @@ -626,13 +626,18 @@ int CMMDVMHost::run() } if (m_ax25Enabled) { - bool trace = m_conf.getAX25Trace(); + int rxTwist = m_conf.getAX25RXTwist(); + int txTwist = m_conf.getAX25TXTwist(); + bool digipeat = m_conf.getAX25Digipeat(); + bool trace = m_conf.getAX25Trace(); LogInfo("AX.25 RF Parameters"); - LogInfo(" RXOnly: yes"); + LogInfo(" RXTwist: %d", rxTwist); + LogInfo(" TXTwist: %d", txTwist); + LogInfo(" Digipeat: %s", digipeat ? "yes" : "no"); LogInfo(" Trace: %s", trace ? "yes" : "no"); - m_ax25 = new CAX25Control(m_ax25Network, trace); + m_ax25 = new CAX25Control(m_ax25Network, digipeat, trace); } bool remoteControlEnabled = m_conf.getRemoteControlEnabled(); @@ -1201,6 +1206,7 @@ bool CMMDVMHost::createModem() float nxdnTXLevel = m_conf.getModemNXDNTXLevel(); float pocsagTXLevel = m_conf.getModemPOCSAGTXLevel(); float fmTXLevel = m_conf.getModemFMTXLevel(); + float ax25TXLevel = m_conf.getModemAX25TXLevel(); bool trace = m_conf.getModemTrace(); bool debug = m_conf.getModemDebug(); unsigned int colorCode = m_conf.getDMRColorCode(); @@ -1216,6 +1222,8 @@ bool CMMDVMHost::createModem() int rxDCOffset = m_conf.getModemRXDCOffset(); int txDCOffset = m_conf.getModemTXDCOffset(); float rfLevel = m_conf.getModemRFLevel(); + int rxTwist = m_conf.getAX25RXTwist(); + int txTwist = m_conf.getAX25TXTwist(); LogInfo("Modem Parameters"); LogInfo(" Port: %s", port.c_str()); @@ -1241,17 +1249,19 @@ bool CMMDVMHost::createModem() LogInfo(" NXDN TX Level: %.1f%%", nxdnTXLevel); LogInfo(" POCSAG TX Level: %.1f%%", pocsagTXLevel); LogInfo(" FM TX Level: %.1f%%", fmTXLevel); + LogInfo(" AX.25 TX Level: %.1f%%", ax25TXLevel); LogInfo(" TX Frequency: %uHz (%uHz)", txFrequency, txFrequency + txOffset); m_modem = CModem::createModem(port, m_duplex, rxInvert, txInvert, pttInvert, txDelay, dmrDelay, trace, debug); m_modem->setSerialParams(protocol,address); m_modem->setModeParams(m_dstarEnabled, m_dmrEnabled, m_ysfEnabled, m_p25Enabled, m_nxdnEnabled, m_pocsagEnabled, m_fmEnabled, m_ax25Enabled); - m_modem->setLevels(rxLevel, cwIdTXLevel, dstarTXLevel, dmrTXLevel, ysfTXLevel, p25TXLevel, nxdnTXLevel, pocsagTXLevel, fmTXLevel); + m_modem->setLevels(rxLevel, cwIdTXLevel, dstarTXLevel, dmrTXLevel, ysfTXLevel, p25TXLevel, nxdnTXLevel, pocsagTXLevel, fmTXLevel, ax25TXLevel); m_modem->setRFParams(rxFrequency, rxOffset, txFrequency, txOffset, txDCOffset, rxDCOffset, rfLevel, pocsagFrequency); m_modem->setDMRParams(colorCode); m_modem->setYSFParams(lowDeviation, ysfTXHang); m_modem->setP25Params(p25TXHang); m_modem->setNXDNParams(nxdnTXHang); + m_modem->setAX25Params(rxTwist, txTwist); if (m_fmEnabled) { std::string callsign = m_conf.getFMCallsign(); diff --git a/Version.h b/Version.h index ffc27e8..7cfe66a 100644 --- a/Version.h +++ b/Version.h @@ -19,6 +19,6 @@ #if !defined(VERSION_H) #define VERSION_H -const char* VERSION = "20200619"; +const char* VERSION = "20200620"; #endif