mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-01-01 05:59:57 +01:00
commit
8b908fddec
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -15,3 +15,4 @@ MMDVMHost
|
|||
*.VC.db
|
||||
.vs
|
||||
*.ambe
|
||||
GitVersion.h
|
||||
|
|
|
|||
39
Conf.cpp
39
Conf.cpp
|
|
@ -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),
|
||||
|
|
@ -107,6 +106,7 @@ m_dmrId(0U),
|
|||
m_dmrColorCode(2U),
|
||||
m_dmrSelfOnly(false),
|
||||
m_dmrEmbeddedLCOnly(false),
|
||||
m_dmrDumpTAData(true),
|
||||
m_dmrPrefixes(),
|
||||
m_dmrBlackList(),
|
||||
m_dmrWhiteList(),
|
||||
|
|
@ -193,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)
|
||||
|
|
@ -216,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;
|
||||
|
|
@ -235,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++)
|
||||
|
|
@ -328,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)
|
||||
|
|
@ -378,6 +379,8 @@ bool CConf::read()
|
|||
m_dmrSelfOnly = ::atoi(value) == 1;
|
||||
else if (::strcmp(key, "EmbeddedLCOnly") == 0)
|
||||
m_dmrEmbeddedLCOnly = ::atoi(value) == 1;
|
||||
else if (::strcmp(key, "DumpTAData") == 0)
|
||||
m_dmrDumpTAData = ::atoi(value) == 1;
|
||||
else if (::strcmp(key, "Prefixes") == 0) {
|
||||
char* p = ::strtok(value, ",\r\n");
|
||||
while (p != NULL) {
|
||||
|
|
@ -739,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;
|
||||
|
|
@ -824,6 +822,11 @@ bool CConf::getDMREmbeddedLCOnly() const
|
|||
return m_dmrEmbeddedLCOnly;
|
||||
}
|
||||
|
||||
bool CConf::getDMRDumpTAData() const
|
||||
{
|
||||
return m_dmrDumpTAData;
|
||||
}
|
||||
|
||||
std::vector<unsigned int> CConf::getDMRPrefixes() const
|
||||
{
|
||||
return m_dmrPrefixes;
|
||||
|
|
|
|||
4
Conf.h
4
Conf.h
|
|
@ -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;
|
||||
|
|
@ -99,6 +98,7 @@ public:
|
|||
unsigned int getDMRId() const;
|
||||
unsigned int getDMRColorCode() const;
|
||||
bool getDMREmbeddedLCOnly() const;
|
||||
bool getDMRDumpTAData() const;
|
||||
bool getDMRSelfOnly() const;
|
||||
std::vector<unsigned int> getDMRPrefixes() const;
|
||||
std::vector<unsigned int> getDMRBlackList() const;
|
||||
|
|
@ -229,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;
|
||||
|
|
@ -249,6 +248,7 @@ private:
|
|||
unsigned int m_dmrColorCode;
|
||||
bool m_dmrSelfOnly;
|
||||
bool m_dmrEmbeddedLCOnly;
|
||||
bool m_dmrDumpTAData;
|
||||
std::vector<unsigned int> m_dmrPrefixes;
|
||||
std::vector<unsigned int> m_dmrBlackList;
|
||||
std::vector<unsigned int> m_dmrWhiteList;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <cassert>
|
||||
#include <algorithm>
|
||||
|
||||
CDMRControl::CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, bool embeddedLCOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blacklist, const std::vector<unsigned int>& whitelist, const std::vector<unsigned int>& slot1TGWhitelist, const std::vector<unsigned int>& slot2TGWhitelist, unsigned int timeout, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssi, unsigned int jitter) :
|
||||
CDMRControl::CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, bool embeddedLCOnly, bool dumpTAData, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blacklist, const std::vector<unsigned int>& whitelist, const std::vector<unsigned int>& slot1TGWhitelist, const std::vector<unsigned int>& slot2TGWhitelist, unsigned int timeout, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssi, unsigned int jitter) :
|
||||
m_id(id),
|
||||
m_colorCode(colorCode),
|
||||
m_modem(modem),
|
||||
|
|
@ -39,7 +39,7 @@ m_lookup(lookup)
|
|||
// Load black and white lists to DMRAccessControl
|
||||
CDMRAccessControl::init(blacklist, whitelist, slot1TGWhitelist, slot2TGWhitelist, selfOnly, prefixes, id);
|
||||
|
||||
CDMRSlot::init(colorCode, embeddedLCOnly, callHang, modem, network, display, duplex, m_lookup, rssi, jitter);
|
||||
CDMRSlot::init(colorCode, embeddedLCOnly, dumpTAData, callHang, modem, network, display, duplex, m_lookup, rssi, jitter);
|
||||
}
|
||||
|
||||
CDMRControl::~CDMRControl()
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
class CDMRControl {
|
||||
public:
|
||||
CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, bool embeddedLCOnly, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blacklist, const std::vector<unsigned int>& whitelist, const std::vector<unsigned int>& slot1TGWhitelist, const std::vector<unsigned int>& slot2TGWhitelist, unsigned int timeout, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssi, unsigned int jitter);
|
||||
CDMRControl(unsigned int id, unsigned int colorCode, unsigned int callHang, bool selfOnly, bool embeddedLCOnly, bool dumpTAData, const std::vector<unsigned int>& prefixes, const std::vector<unsigned int>& blacklist, const std::vector<unsigned int>& whitelist, const std::vector<unsigned int>& slot1TGWhitelist, const std::vector<unsigned int>& slot2TGWhitelist, unsigned int timeout, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssi, unsigned int jitter);
|
||||
~CDMRControl();
|
||||
|
||||
bool processWakeup(const unsigned char* data);
|
||||
|
|
|
|||
3113
DMRIds.dat
3113
DMRIds.dat
File diff suppressed because it is too large
Load diff
150
DMRSlot.cpp
150
DMRSlot.cpp
|
|
@ -32,6 +32,7 @@
|
|||
unsigned int CDMRSlot::m_colorCode = 0U;
|
||||
|
||||
bool CDMRSlot::m_embeddedLCOnly = false;
|
||||
bool CDMRSlot::m_dumpTAData = true;
|
||||
|
||||
CModem* CDMRSlot::m_modem = NULL;
|
||||
CDMRNetwork* CDMRSlot::m_network = NULL;
|
||||
|
|
@ -378,8 +379,10 @@ void CDMRSlot::writeModem(unsigned char *data, unsigned int len)
|
|||
|
||||
LogMessage("DMR Slot %u, received RF data header from %s to %s%s, %u blocks", m_slotNo, src.c_str(), gi ? "TG ": "", dst.c_str(), m_rfFrames);
|
||||
|
||||
if (m_rfFrames == 0U)
|
||||
endOfRFData();
|
||||
if (m_rfFrames == 0U) {
|
||||
LogMessage("DMR Slot %u, ended RF data transmission", m_slotNo);
|
||||
writeEndRF();
|
||||
}
|
||||
} else if (dataType == DT_CSBK) {
|
||||
CDMRCSBK csbk;
|
||||
bool valid = csbk.put(data + 2U);
|
||||
|
|
@ -483,8 +486,10 @@ void CDMRSlot::writeModem(unsigned char *data, unsigned int len)
|
|||
|
||||
writeNetworkRF(data, dataType);
|
||||
|
||||
if (m_rfFrames == 0U)
|
||||
endOfRFData();
|
||||
if (m_rfFrames == 0U) {
|
||||
LogMessage("DMR Slot %u, ended RF data transmission", m_slotNo);
|
||||
writeEndRF();
|
||||
}
|
||||
}
|
||||
} else if (audioSync) {
|
||||
if (m_rfState == RS_RF_AUDIO) {
|
||||
|
|
@ -558,34 +563,48 @@ void CDMRSlot::writeModem(unsigned char *data, unsigned int len)
|
|||
// CUtils::dump(1U, text, data, 9U);
|
||||
break;
|
||||
case FLCO_GPS_INFO:
|
||||
::sprintf(text, "DMR Slot %u, Embedded GPS Info", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
if (m_dumpTAData) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded GPS Info", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
}
|
||||
break;
|
||||
case FLCO_TALKER_ALIAS_HEADER:
|
||||
if (!(m_rfTalkerId & TALKER_ID_HEADER)) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Header", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
if (m_dumpTAData) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Header", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
}
|
||||
|
||||
m_rfTalkerId |= TALKER_ID_HEADER;
|
||||
}
|
||||
break;
|
||||
case FLCO_TALKER_ALIAS_BLOCK1:
|
||||
if (!(m_rfTalkerId & TALKER_ID_BLOCK1)) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Block 1", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
if (m_dumpTAData) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Block 1", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
}
|
||||
|
||||
m_rfTalkerId |= TALKER_ID_BLOCK1;
|
||||
}
|
||||
break;
|
||||
case FLCO_TALKER_ALIAS_BLOCK2:
|
||||
if (!(m_rfTalkerId & TALKER_ID_BLOCK2)) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Block 2", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
if (m_dumpTAData) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Block 2", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
}
|
||||
|
||||
m_rfTalkerId |= TALKER_ID_BLOCK2;
|
||||
}
|
||||
break;
|
||||
case FLCO_TALKER_ALIAS_BLOCK3:
|
||||
if (!(m_rfTalkerId & TALKER_ID_BLOCK3)) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Block 3", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
if (m_dumpTAData) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Block 3", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
}
|
||||
|
||||
m_rfTalkerId |= TALKER_ID_BLOCK3;
|
||||
}
|
||||
break;
|
||||
|
|
@ -760,33 +779,6 @@ unsigned int CDMRSlot::readModem(unsigned char* data)
|
|||
return len;
|
||||
}
|
||||
|
||||
void CDMRSlot::endOfRFData()
|
||||
{
|
||||
LogMessage("DMR Slot %u, ended RF data transmission", m_slotNo);
|
||||
|
||||
if (m_duplex) {
|
||||
unsigned char bytes[DMR_FRAME_LENGTH_BYTES + 2U];
|
||||
|
||||
CSync::addDMRDataSync(bytes + 2U, m_duplex);
|
||||
|
||||
CDMRSlotType slotType;
|
||||
slotType.setDataType(DT_TERMINATOR_WITH_LC);
|
||||
slotType.setColorCode(m_colorCode);
|
||||
slotType.getData(bytes + 2U);
|
||||
|
||||
m_rfDataHeader.getTerminator(bytes + 2U);
|
||||
|
||||
bytes[0U] = TAG_EOT;
|
||||
bytes[1U] = 0x00U;
|
||||
|
||||
writeQueueRF(bytes);
|
||||
writeQueueRF(bytes);
|
||||
writeQueueRF(bytes);
|
||||
}
|
||||
|
||||
writeEndRF();
|
||||
}
|
||||
|
||||
void CDMRSlot::writeEndRF(bool writeEnd)
|
||||
{
|
||||
m_rfState = RS_RF_LISTENING;
|
||||
|
|
@ -829,33 +821,6 @@ void CDMRSlot::writeEndRF(bool writeEnd)
|
|||
m_rfLC = NULL;
|
||||
}
|
||||
|
||||
void CDMRSlot::endOfNetData()
|
||||
{
|
||||
LogMessage("DMR Slot %u, ended network data transmission", m_slotNo);
|
||||
|
||||
if (m_duplex) {
|
||||
unsigned char bytes[DMR_FRAME_LENGTH_BYTES + 2U];
|
||||
|
||||
CSync::addDMRDataSync(bytes + 2U, m_duplex);
|
||||
|
||||
CDMRSlotType slotType;
|
||||
slotType.setDataType(DT_TERMINATOR_WITH_LC);
|
||||
slotType.setColorCode(m_colorCode);
|
||||
slotType.getData(bytes + 2U);
|
||||
|
||||
m_netDataHeader.getTerminator(bytes + 2U);
|
||||
|
||||
bytes[0U] = TAG_EOT;
|
||||
bytes[1U] = 0x00U;
|
||||
|
||||
writeQueueNet(bytes);
|
||||
writeQueueNet(bytes);
|
||||
writeQueueNet(bytes);
|
||||
}
|
||||
|
||||
writeEndNet();
|
||||
}
|
||||
|
||||
void CDMRSlot::writeEndNet(bool writeEnd)
|
||||
{
|
||||
m_netState = RS_NET_IDLE;
|
||||
|
|
@ -1169,8 +1134,10 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
|
||||
LogMessage("DMR Slot %u, received network data header from %s to %s%s, %u blocks", m_slotNo, src.c_str(), gi ? "TG ": "", dst.c_str(), m_netFrames);
|
||||
|
||||
if (m_netFrames == 0U)
|
||||
endOfNetData();
|
||||
if (m_netFrames == 0U) {
|
||||
LogMessage("DMR Slot %u, ended network data transmission", m_slotNo);
|
||||
writeEndNet();
|
||||
}
|
||||
} else if (dataType == DT_VOICE_SYNC) {
|
||||
if (m_netState == RS_NET_IDLE) {
|
||||
CDMRLC* lc = new CDMRLC(dmrData.getFLCO(), dmrData.getSrcId(), dmrData.getDstId());
|
||||
|
|
@ -1314,34 +1281,48 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
// CUtils::dump(1U, text, data, 9U);
|
||||
break;
|
||||
case FLCO_GPS_INFO:
|
||||
::sprintf(text, "DMR Slot %u, Embedded GPS Info", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
if (m_dumpTAData) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded GPS Info", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
}
|
||||
break;
|
||||
case FLCO_TALKER_ALIAS_HEADER:
|
||||
if (!(m_netTalkerId & TALKER_ID_HEADER)) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Header", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
if (m_dumpTAData) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Header", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
}
|
||||
|
||||
m_netTalkerId |= TALKER_ID_HEADER;
|
||||
}
|
||||
break;
|
||||
case FLCO_TALKER_ALIAS_BLOCK1:
|
||||
if (!(m_netTalkerId & TALKER_ID_BLOCK1)) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Block 1", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
if (m_dumpTAData) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Block 1", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
}
|
||||
|
||||
m_netTalkerId |= TALKER_ID_BLOCK1;
|
||||
}
|
||||
break;
|
||||
case FLCO_TALKER_ALIAS_BLOCK2:
|
||||
if (!(m_netTalkerId & TALKER_ID_BLOCK2)) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Block 2", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
if (m_dumpTAData) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Block 2", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
}
|
||||
|
||||
m_netTalkerId |= TALKER_ID_BLOCK2;
|
||||
}
|
||||
break;
|
||||
case FLCO_TALKER_ALIAS_BLOCK3:
|
||||
if (!(m_netTalkerId & TALKER_ID_BLOCK3)) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Block 3", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
if (m_dumpTAData) {
|
||||
::sprintf(text, "DMR Slot %u, Embedded Talker Alias Block 3", m_slotNo);
|
||||
CUtils::dump(2U, text, data, 9U);
|
||||
}
|
||||
|
||||
m_netTalkerId |= TALKER_ID_BLOCK3;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1496,8 +1477,10 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
#endif
|
||||
writeQueueNet(data);
|
||||
|
||||
if (m_netFrames == 0U)
|
||||
endOfNetData();
|
||||
if (m_netFrames == 0U) {
|
||||
LogMessage("DMR Slot %u, ended network data transmission", m_slotNo);
|
||||
writeEndNet();
|
||||
}
|
||||
} else {
|
||||
// Unhandled data type
|
||||
LogWarning("DMR Slot %u, unhandled network data type - 0x%02X", m_slotNo, dataType);
|
||||
|
|
@ -1635,7 +1618,7 @@ void CDMRSlot::writeQueueNet(const unsigned char *data)
|
|||
m_queue.addData(data, len);
|
||||
}
|
||||
|
||||
void CDMRSlot::init(unsigned int colorCode, bool embeddedLCOnly, unsigned int callHang, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssiMapper, unsigned int jitter)
|
||||
void CDMRSlot::init(unsigned int colorCode, bool embeddedLCOnly, bool dumpTAData, unsigned int callHang, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssiMapper, unsigned int jitter)
|
||||
{
|
||||
assert(modem != NULL);
|
||||
assert(display != NULL);
|
||||
|
|
@ -1644,6 +1627,7 @@ void CDMRSlot::init(unsigned int colorCode, bool embeddedLCOnly, unsigned int ca
|
|||
|
||||
m_colorCode = colorCode;
|
||||
m_embeddedLCOnly = embeddedLCOnly;
|
||||
m_dumpTAData = dumpTAData;
|
||||
m_modem = modem;
|
||||
m_network = network;
|
||||
m_display = display;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public:
|
|||
|
||||
void clock();
|
||||
|
||||
static void init(unsigned int colorCode, bool embeddedLCOnly, unsigned int callHang, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssiMapper, unsigned int jitter);
|
||||
static void init(unsigned int colorCode, bool embeddedLCOnly, bool dumpTAData, unsigned int callHang, CModem* modem, CDMRNetwork* network, CDisplay* display, bool duplex, CDMRLookup* lookup, CRSSIInterpolator* rssiMapper, unsigned int jitter);
|
||||
|
||||
private:
|
||||
unsigned int m_slotNo;
|
||||
|
|
@ -101,6 +101,7 @@ private:
|
|||
static unsigned int m_colorCode;
|
||||
|
||||
static bool m_embeddedLCOnly;
|
||||
static bool m_dumpTAData;
|
||||
|
||||
static CModem* m_modem;
|
||||
static CDMRNetwork* m_network;
|
||||
|
|
@ -128,9 +129,6 @@ private:
|
|||
void writeNetworkRF(const unsigned char* data, unsigned char dataType, unsigned char errors = 0U);
|
||||
void writeNetworkRF(const unsigned char* data, unsigned char dataType, FLCO flco, unsigned int srcId, unsigned int dstId, unsigned char errors = 0U);
|
||||
|
||||
void endOfRFData();
|
||||
void endOfNetData();
|
||||
|
||||
void writeEndRF(bool writeEnd = false);
|
||||
void writeEndNet(bool writeEnd = false);
|
||||
|
||||
|
|
|
|||
11
ISSUES.txt
Normal file
11
ISSUES.txt
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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.
|
||||
|
||||
Timeouts aren't handled cleany, i.e. the repeater should go off transmit rather than stay on.
|
||||
|
||||
It seems like there is a need to add some idle frames at the beginning of a DMO transmission in order allow older DMR radios to wake up.
|
||||
|
||||
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.
|
||||
|
||||
P25: No obvious issues.
|
||||
|
|
@ -49,7 +49,6 @@ TXLevel=50
|
|||
# DMRTXLevel=50
|
||||
# YSFTXLevel=50
|
||||
# P25TXLevel=50
|
||||
OscOffset=0
|
||||
RSSIMappingFile=RSSI.dat
|
||||
SamplesDir=.
|
||||
Debug=0
|
||||
|
|
@ -72,6 +71,7 @@ Id=123456
|
|||
ColorCode=1
|
||||
SelfOnly=0
|
||||
EmbeddedLCOnly=0
|
||||
DumpTAData=1
|
||||
# Prefixes=234,235
|
||||
# Slot1TGWhiteList=
|
||||
# Slot2TGWhiteList=
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "LCDproc.h"
|
||||
#include "Thread.h"
|
||||
#include "Log.h"
|
||||
#include "GitVersion.h"
|
||||
|
||||
#if defined(HD44780)
|
||||
#include "HD44780.h"
|
||||
|
|
@ -73,7 +74,7 @@ static void sigHandler(int signum)
|
|||
const char* HEADER1 = "This software is for use on amateur radio networks only,";
|
||||
const char* HEADER2 = "it is to be used for educational purposes only. Its use on";
|
||||
const char* HEADER3 = "commercial networks is strictly prohibited.";
|
||||
const char* HEADER4 = "Copyright(C) 2015, 2016 by Jonathan Naylor, G4KLX and others";
|
||||
const char* HEADER4 = "Copyright(C) 2015-2017 by Jonathan Naylor, G4KLX and others";
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
|
@ -235,6 +236,7 @@ int CMMDVMHost::run()
|
|||
LogInfo(HEADER4);
|
||||
|
||||
LogMessage("MMDVMHost-%s is starting", VERSION);
|
||||
LogMessage("Built %s %s (GitID #%.7s)", __TIME__, __DATE__, gitversion);
|
||||
|
||||
readParams();
|
||||
|
||||
|
|
@ -347,13 +349,14 @@ int CMMDVMHost::run()
|
|||
unsigned int id = m_conf.getDMRId();
|
||||
unsigned int colorCode = m_conf.getDMRColorCode();
|
||||
bool selfOnly = m_conf.getDMRSelfOnly();
|
||||
bool embeddedLCOnly = m_conf.getDMREmbeddedLCOnly();
|
||||
bool embeddedLCOnly = m_conf.getDMREmbeddedLCOnly();
|
||||
bool dumpTAData = m_conf.getDMRDumpTAData();
|
||||
std::vector<unsigned int> prefixes = m_conf.getDMRPrefixes();
|
||||
std::vector<unsigned int> blackList = m_conf.getDMRBlackList();
|
||||
std::vector<unsigned int> whiteList = m_conf.getDMRWhiteList();
|
||||
std::vector<unsigned int> slot1TGWhiteList = m_conf.getDMRSlot1TGWhiteList();
|
||||
std::vector<unsigned int> slot2TGWhiteList = m_conf.getDMRSlot2TGWhiteList();
|
||||
unsigned int callHang = m_conf.getDMRCallHang();
|
||||
unsigned int callHang = m_conf.getDMRCallHang();
|
||||
unsigned int txHang = m_conf.getDMRTXHang();
|
||||
unsigned int jitter = m_conf.getDMRNetworkJitter();
|
||||
|
||||
|
|
@ -370,6 +373,7 @@ int CMMDVMHost::run()
|
|||
LogInfo(" Color Code: %u", colorCode);
|
||||
LogInfo(" Self Only: %s", selfOnly ? "yes" : "no");
|
||||
LogInfo(" Embedded LC Only: %s", embeddedLCOnly ? "yes" : "no");
|
||||
LogInfo(" Dump Talker Alias Data: %s", dumpTAData ? "yes" : "no");
|
||||
LogInfo(" Prefixes: %u", prefixes.size());
|
||||
|
||||
if (blackList.size() > 0U)
|
||||
|
|
@ -384,7 +388,7 @@ int CMMDVMHost::run()
|
|||
LogInfo(" Call Hang: %us", callHang);
|
||||
LogInfo(" TX Hang: %us", txHang);
|
||||
|
||||
dmr = new CDMRControl(id, colorCode, callHang, selfOnly, embeddedLCOnly, prefixes, blackList, whiteList, slot1TGWhiteList, slot2TGWhiteList, m_timeout, m_modem, m_dmrNetwork, m_display, m_duplex, m_lookup, rssi, jitter);
|
||||
dmr = new CDMRControl(id, colorCode, callHang, selfOnly, embeddedLCOnly, dumpTAData, prefixes, blackList, whiteList, slot1TGWhiteList, slot2TGWhiteList, m_timeout, m_modem, m_dmrNetwork, m_display, m_duplex, m_lookup, rssi, jitter);
|
||||
|
||||
m_dmrTXTimer.setTimeout(txHang);
|
||||
}
|
||||
|
|
@ -794,7 +798,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");
|
||||
|
|
@ -812,9 +815,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);
|
||||
|
|
@ -1266,7 +1268,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();
|
||||
|
|
|
|||
|
|
@ -108,6 +108,12 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(ProjectDir)prebuild.cmd" $(ProjectDir)</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>prebuild.cmd generates GitVersion.h from git refs heads master</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
|
|
|
|||
13
Makefile
13
Makefile
|
|
@ -15,12 +15,19 @@ OBJECTS = \
|
|||
|
||||
all: MMDVMHost
|
||||
|
||||
MMDVMHost: $(OBJECTS)
|
||||
MMDVMHost: GitVersion.h $(OBJECTS)
|
||||
$(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o MMDVMHost
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
$(RM) MMDVMHost *.o *.d *.bak *~
|
||||
|
||||
$(RM) MMDVMHost *.o *.d *.bak *~ GitVersion.h
|
||||
|
||||
# Export the current git version if the index file exists, else 000...
|
||||
GitVersion.h:
|
||||
ifneq ("$(wildcard .git/index)","")
|
||||
echo "const char *gitversion = \"$(shell git rev-parse HEAD)\";" > $@
|
||||
else
|
||||
echo "const char *gitversion = \"0000000000000000000000000000000000000000\";" > $@
|
||||
endif
|
||||
|
|
|
|||
13
Makefile.Pi
13
Makefile.Pi
|
|
@ -15,12 +15,19 @@ OBJECTS = \
|
|||
|
||||
all: MMDVMHost
|
||||
|
||||
MMDVMHost: $(OBJECTS)
|
||||
MMDVMHost: GitVersion.h $(OBJECTS)
|
||||
$(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o MMDVMHost
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
$(RM) MMDVMHost *.o *.d *.bak *~
|
||||
|
||||
$(RM) MMDVMHost *.o *.d *.bak *~ GitVersion.h
|
||||
|
||||
# Export the current git version if the index file exists, else 000...
|
||||
GitVersion.h:
|
||||
ifneq ("$(wildcard .git/index)","")
|
||||
echo "const char *gitversion = \"$(shell git rev-parse HEAD)\";" > $@
|
||||
else
|
||||
echo "const char *gitversion = \"0000000000000000000000000000000000000000\";" > $@
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -15,12 +15,19 @@ OBJECTS = \
|
|||
|
||||
all: MMDVMHost
|
||||
|
||||
MMDVMHost: $(OBJECTS)
|
||||
MMDVMHost: GitVersion.h $(OBJECTS)
|
||||
$(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o MMDVMHost
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
$(RM) MMDVMHost *.o *.d *.bak *~
|
||||
|
||||
$(RM) MMDVMHost *.o *.d *.bak *~ GitVersion.h
|
||||
|
||||
# Export the current git version if the index file exists, else 000...
|
||||
GitVersion.h:
|
||||
ifneq ("$(wildcard .git/index)","")
|
||||
echo "const char *gitversion = \"$(shell git rev-parse HEAD)\";" > $@
|
||||
else
|
||||
echo "const char *gitversion = \"0000000000000000000000000000000000000000\";" > $@
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -15,12 +15,19 @@ OBJECTS = \
|
|||
|
||||
all: MMDVMHost
|
||||
|
||||
MMDVMHost: $(OBJECTS)
|
||||
MMDVMHost: GitVersion.h $(OBJECTS)
|
||||
$(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o MMDVMHost
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
$(RM) MMDVMHost *.o *.d *.bak *~
|
||||
|
||||
$(RM) MMDVMHost *.o *.d *.bak *~ GitVersion.h
|
||||
|
||||
# Export the current git version if the index file exists, else 000...
|
||||
GitVersion.h:
|
||||
ifneq ("$(wildcard .git/index)","")
|
||||
echo "const char *gitversion = \"$(shell git rev-parse HEAD)\";" > $@
|
||||
else
|
||||
echo "const char *gitversion = \"0000000000000000000000000000000000000000\";" > $@
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -15,12 +15,19 @@ OBJECTS = \
|
|||
|
||||
all: MMDVMHost
|
||||
|
||||
MMDVMHost: $(OBJECTS)
|
||||
MMDVMHost: GitVersion.h $(OBJECTS)
|
||||
$(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o MMDVMHost
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
$(RM) MMDVMHost *.o *.d *.bak *~
|
||||
|
||||
$(RM) MMDVMHost *.o *.d *.bak *~ GitVersion.h
|
||||
|
||||
# Export the current git version if the index file exists, else 000...
|
||||
GitVersion.h:
|
||||
ifneq ("$(wildcard .git/index)","")
|
||||
echo "const char *gitversion = \"$(shell git rev-parse HEAD)\";" > $@
|
||||
else
|
||||
echo "const char *gitversion = \"0000000000000000000000000000000000000000\";" > $@
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -15,11 +15,19 @@ OBJECTS = \
|
|||
|
||||
all: MMDVMHost
|
||||
|
||||
MMDVMHost: $(OBJECTS)
|
||||
MMDVMHost: GitVersion.h $(OBJECTS)
|
||||
$(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o MMDVMHost
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
$(RM) MMDVMHost *.o *.d *.bak *~
|
||||
$(RM) MMDVMHost *.o *.d *.bak *~ GitVersion.h
|
||||
|
||||
# Export the current git version if the index file exists, else 000...
|
||||
GitVersion.h:
|
||||
ifneq ("$(wildcard .git/index)","")
|
||||
echo "const char *gitversion = \"$(shell git rev-parse HEAD)\";" > $@
|
||||
else
|
||||
echo "const char *gitversion = \"0000000000000000000000000000000000000000\";" > $@
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -15,12 +15,19 @@ OBJECTS = \
|
|||
|
||||
all: MMDVMHost
|
||||
|
||||
MMDVMHost: $(OBJECTS)
|
||||
MMDVMHost: GitVersion.h $(OBJECTS)
|
||||
$(CXX) $(OBJECTS) $(CFLAGS) $(LIBS) -o MMDVMHost
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
$(RM) MMDVMHost *.o *.d *.bak *~
|
||||
|
||||
$(RM) MMDVMHost *.o *.d *.bak *~ GitVersion.h
|
||||
|
||||
# Export the current git version if the index file exists, else 000...
|
||||
GitVersion.h:
|
||||
ifneq ("$(wildcard .git/index)","")
|
||||
echo "const char *gitversion = \"$(shell git rev-parse HEAD)\";" > $@
|
||||
else
|
||||
echo "const char *gitversion = \"0000000000000000000000000000000000000000\";" > $@
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -1166,7 +1165,7 @@ RESP_TYPE_MMDVM CModem::getResponse()
|
|||
|
||||
// CUtils::dump(1U, "Received", m_buffer, m_length);
|
||||
|
||||
return RTM_OK;
|
||||
return RTM_OK;
|
||||
}
|
||||
|
||||
HW_TYPE CModem::getHWType() const
|
||||
|
|
@ -1337,7 +1336,7 @@ void CModem::dumpSamples()
|
|||
return;
|
||||
}
|
||||
|
||||
::fwrite(m_buffer + 6U, 1U, m_length, fp);
|
||||
::fwrite(m_buffer + 6U, 1U, m_length - 6U, fp);
|
||||
|
||||
::fclose(fp);
|
||||
}
|
||||
|
|
|
|||
3
Modem.h
3
Modem.h
|
|
@ -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;
|
||||
|
|
|
|||
43
RSSI/RSSI_GM340.dat
Normal file
43
RSSI/RSSI_GM340.dat
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# This file maps the raw RSSI values to dBm values to send to the DMR network. A number of data
|
||||
# points should be entered and the software will use those to work out the in-between values.
|
||||
#
|
||||
# The format of the file is:
|
||||
# Raw RSSI Value dBm Value
|
||||
#
|
||||
# Measured with a Marconi 2955 Test set and Motorola GM340 UHF (430.6125 MHz) using Arduino DUE.
|
||||
# No resistor divider, 100nF decoupling capacitor from ADC to ground.
|
||||
# Both S-meter (6dB) and decade (10dB) steps are included between the noise floor and saturation.
|
||||
# George M1GEO / GB7KH - 01/01/2017
|
||||
#
|
||||
2858 -20
|
||||
2857 -30
|
||||
2856 -40
|
||||
2855 -43
|
||||
2854 -48
|
||||
2853 -50
|
||||
2845 -53
|
||||
2780 -58
|
||||
2732 -60
|
||||
2647 -63
|
||||
2484 -68
|
||||
2422 -70
|
||||
2356 -73
|
||||
2234 -78
|
||||
2183 -80
|
||||
2103 -83
|
||||
1978 -88
|
||||
1931 -90
|
||||
1875 -93
|
||||
1710 -99
|
||||
1686 -100
|
||||
1545 -105
|
||||
1416 -110
|
||||
1398 -111
|
||||
1238 -117
|
||||
1166 -120
|
||||
1106 -123
|
||||
1018 -129
|
||||
1006 -130
|
||||
985 -135
|
||||
976 -140
|
||||
971 -150
|
||||
48
RSSI/RSSI_TB7100.dat
Normal file
48
RSSI/RSSI_TB7100.dat
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# This file maps the raw RSSI values to dBm values to send to the DMR network. A number of data
|
||||
# points should be entered and the software will use those to work out the in-between values.
|
||||
#
|
||||
# The format of the file is:
|
||||
# Raw RSSI Value dBm Value #output voltage
|
||||
#
|
||||
# The following values were measured with a Marconi 2024 signal generator.
|
||||
# Setup is MMDVM (PCB by Toufik, F0DEI) on a STM32F446RE Nucleo board.
|
||||
# The values in the comments are the voltage measured at the TB7100 RSSI output pin.
|
||||
# Florian DF2ET, 03.03.2017
|
||||
#
|
||||
2303 -22 #2.93
|
||||
2256 -25 #2.86
|
||||
2184 -28 #2.77
|
||||
2159 -31 #2.74
|
||||
2095 -34 #2.66
|
||||
2040 -37 #2.59
|
||||
1985 -40 #2.52
|
||||
1922 -43 #2.44
|
||||
1868 -46 #2.37
|
||||
1804 -49 #2.29
|
||||
1758 -52 #2.23
|
||||
1694 -55 #2.15
|
||||
1640 -58 #2.08
|
||||
1568 -61 #1.99
|
||||
1540 -64 #1.95
|
||||
1459 -67 #1.85
|
||||
1403 -70 #1.78
|
||||
1340 -73 #1.70
|
||||
1287 -76 #1.63
|
||||
1233 -79 #1.56
|
||||
1178 -82 #1.49
|
||||
1116 -85 #1.41
|
||||
1054 -88 #1.33
|
||||
1000 -91 #1.27
|
||||
945 -94 #1.20
|
||||
890 -97 #1.13
|
||||
830 -100 #1.05
|
||||
768 -103 #0.97
|
||||
715 -106 #0.90
|
||||
660 -109 #0.83
|
||||
600 -112 #0.76
|
||||
540 -115 #0.68
|
||||
500 -118 #0.63
|
||||
450 -121 #0.57
|
||||
420 -124 #0.52
|
||||
390 -127 #0.48
|
||||
370 -130 #0.47
|
||||
106
RSSI/RSSI_gm340uhf_RA4NHY.dat
Normal file
106
RSSI/RSSI_gm340uhf_RA4NHY.dat
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
#The data to RSSI.dat by RA4NHY
|
||||
#Values in the RSSI.dat file are obtained using the MMDVMCal calibration program (S mode), the high-frequency generator and the Motorola GM340UHF radio station.
|
||||
#For different radio stations, the values are slightly different.
|
||||
#For example, for those GM340 that I had, the discrepancy is about 10 dB.
|
||||
#Therefore, it is desirable to carry out calibration for each radio station.
|
||||
#More about RSSI and a homebrew MMDVM node you can read here https://drive.google.com/file/d/0B_UNZTdPtyZUUjN2d2llV0RtNTQ/view but unfortunately in Russian only
|
||||
#Anton, RA4NHY
|
||||
|
||||
1045 -43
|
||||
1043 -46
|
||||
1042 -47
|
||||
1041 -48
|
||||
1039 -49
|
||||
1036 -50
|
||||
1030 -51
|
||||
1024 -52
|
||||
1017 -53
|
||||
1009 -54
|
||||
1003 -55
|
||||
992 -56
|
||||
980 -57
|
||||
967 -58
|
||||
955 -59
|
||||
941 -60
|
||||
929 -61
|
||||
916 -62
|
||||
905 -63
|
||||
893 -64
|
||||
884 -65
|
||||
874 -66
|
||||
865 -67
|
||||
856 -68
|
||||
848 -69
|
||||
839 -70
|
||||
831 -71
|
||||
823 -72
|
||||
815 -73
|
||||
805 -74
|
||||
799 -75
|
||||
789 -76
|
||||
778 -77
|
||||
767 -78
|
||||
757 -79
|
||||
746 -80
|
||||
737 -81
|
||||
727 -82
|
||||
719 -83
|
||||
711 -84
|
||||
704 -85
|
||||
696 -86
|
||||
689 -87
|
||||
682 -88
|
||||
674 -89
|
||||
667 -90
|
||||
659 -91
|
||||
650 -92
|
||||
641 -93
|
||||
630 -94
|
||||
621 -95
|
||||
610 -96
|
||||
598 -97
|
||||
586 -98
|
||||
575 -99
|
||||
564 -100
|
||||
554 -101
|
||||
544 -102
|
||||
535 -103
|
||||
526 -104
|
||||
521 -105
|
||||
512 -106
|
||||
504 -107
|
||||
495 -108
|
||||
486 -109
|
||||
477 -110
|
||||
468 -111
|
||||
458 -112
|
||||
449 -113
|
||||
439 -114
|
||||
431 -115
|
||||
421 -116
|
||||
412 -117
|
||||
404 -118
|
||||
395 -119
|
||||
387 -120
|
||||
381 -121
|
||||
374 -122
|
||||
368 -123
|
||||
363 -124
|
||||
360 -125
|
||||
355 -126
|
||||
352 -127
|
||||
348 -128
|
||||
345 -129
|
||||
344 -130
|
||||
342 -131
|
||||
340 -132
|
||||
339 -133
|
||||
338 -134
|
||||
337 -135
|
||||
336 -136
|
||||
335 -137
|
||||
334 -138
|
||||
333 -139
|
||||
332 -140
|
||||
331 -141
|
||||
330 -142
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -19,6 +19,6 @@
|
|||
#if !defined(VERSION_H)
|
||||
#define VERSION_H
|
||||
|
||||
const char* VERSION = "20170206";
|
||||
const char* VERSION = "20170303";
|
||||
|
||||
#endif
|
||||
|
|
|
|||
38
prebuild.cmd
Normal file
38
prebuild.cmd
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
@echo off
|
||||
REM This pre-build file is for MSVS VC++. It parses the git master hash and
|
||||
REM converts it into GitVersion.h for compiling into builds. [George M1GEO]
|
||||
|
||||
cd %1
|
||||
setlocal enabledelayedexpansion
|
||||
set HEADFILE=.git\HEAD
|
||||
set HASHFILE=0
|
||||
if exist %HEADFILE% (
|
||||
for /F "tokens=4 delims=/:" %%a in ('type %HEADFILE%') do set HEADBRANCH=%%a
|
||||
set HASHFILE=.git\refs\heads\!HEADBRANCH!
|
||||
echo Found Git HEAD file: %HEADFILE%
|
||||
echo Git HEAD branch: !HEADBRANCH!
|
||||
echo Git HASH file: !HASHFILE!
|
||||
call :USEHASH
|
||||
) else (
|
||||
echo No head file :(
|
||||
call :USENULL
|
||||
)
|
||||
|
||||
goto :EOF
|
||||
|
||||
:USENULL
|
||||
set GITHASH=0000000000000000000000000000000000000000
|
||||
goto :WRITEGITVERSIONHEADER
|
||||
|
||||
:USEHASH
|
||||
for /f %%i in ('type !HASHFILE!') do set GITHASH=%%i
|
||||
goto :WRITEGITVERSIONHEADER
|
||||
|
||||
:WRITEGITVERSIONHEADER
|
||||
echo // File contains Git commit ID SHA1 present at buildtime (prebuild.cmd) > GitVersion.h
|
||||
echo const char *gitversion = "%GITHASH%"; >> GitVersion.h
|
||||
echo Current Git HASH: %GITHASH%
|
||||
goto :FINISHED
|
||||
|
||||
:FINISHED
|
||||
echo GitVersion.h written...
|
||||
Loading…
Reference in a new issue