Merge remote-tracking branch 'upstream/master' into define_display_sizes
Conflicts: HD44780.cpp
This commit is contained in:
commit
a853a8cad0
30
DMRSlot.cpp
30
DMRSlot.cpp
|
@ -175,13 +175,14 @@ void CDMRSlot::writeModem(unsigned char *data)
|
|||
m_rfState = RS_RF_AUDIO;
|
||||
|
||||
std::string src = m_lookup->find(id);
|
||||
std::string dst = m_lookup->find(m_rfLC->getDstId());
|
||||
|
||||
if (m_netState == RS_NET_IDLE) {
|
||||
setShortLC(m_slotNo, m_rfLC->getDstId(), m_rfLC->getFLCO(), true);
|
||||
m_display->writeDMR(m_slotNo, src.c_str(), m_rfLC->getFLCO() == FLCO_GROUP, m_rfLC->getDstId(), "R");
|
||||
m_display->writeDMR(m_slotNo, src.c_str(), m_rfLC->getFLCO() == FLCO_GROUP, dst.c_str(), "R");
|
||||
}
|
||||
|
||||
LogMessage("DMR Slot %u, received RF voice header from %s to %s%u", m_slotNo, src.c_str(), m_rfLC->getFLCO() == FLCO_GROUP ? "TG " : "", m_rfLC->getDstId());
|
||||
LogMessage("DMR Slot %u, received RF voice header from %s to %s%s", m_slotNo, src.c_str(), m_rfLC->getFLCO() == FLCO_GROUP ? "TG " : "", dst.c_str());
|
||||
} else if (dataType == DT_VOICE_PI_HEADER) {
|
||||
if (m_rfState != RS_RF_AUDIO)
|
||||
return;
|
||||
|
@ -284,13 +285,14 @@ void CDMRSlot::writeModem(unsigned char *data)
|
|||
m_rfState = RS_RF_DATA;
|
||||
|
||||
std::string src = m_lookup->find(srcId);
|
||||
std::string dst = m_lookup->find(dstId);
|
||||
|
||||
if (m_netState == RS_NET_IDLE) {
|
||||
setShortLC(m_slotNo, dstId, gi ? FLCO_GROUP : FLCO_USER_USER, false);
|
||||
m_display->writeDMR(m_slotNo, src.c_str(), gi, dstId, "R");
|
||||
m_display->writeDMR(m_slotNo, src.c_str(), gi, dst.c_str(), "R");
|
||||
}
|
||||
|
||||
LogMessage("DMR Slot %u, received RF data header from %s to %s%u, %u blocks", m_slotNo, src.c_str(), gi ? "TG ": "", dstId, m_rfFrames);
|
||||
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);
|
||||
} else if (dataType == DT_CSBK) {
|
||||
CDMRCSBK csbk;
|
||||
bool valid = csbk.put(data + 2U);
|
||||
|
@ -559,13 +561,14 @@ void CDMRSlot::writeModem(unsigned char *data)
|
|||
m_rfState = RS_RF_AUDIO;
|
||||
|
||||
std::string src = m_lookup->find(m_rfLC->getSrcId());
|
||||
std::string dst = m_lookup->find(m_rfLC->getDstId());
|
||||
|
||||
if (m_netState == RS_NET_IDLE) {
|
||||
setShortLC(m_slotNo, m_rfLC->getDstId(), m_rfLC->getFLCO(), true);
|
||||
m_display->writeDMR(m_slotNo, src.c_str(), m_rfLC->getFLCO() == FLCO_GROUP, m_rfLC->getDstId(), "R");
|
||||
m_display->writeDMR(m_slotNo, src.c_str(), m_rfLC->getFLCO() == FLCO_GROUP, dst.c_str(), "R");
|
||||
}
|
||||
|
||||
LogMessage("DMR Slot %u, received RF late entry from %s to %s%u", m_slotNo, src.c_str(), m_rfLC->getFLCO() == FLCO_GROUP ? "TG " : "", m_rfLC->getDstId());
|
||||
LogMessage("DMR Slot %u, received RF late entry from %s to %s%s", m_slotNo, src.c_str(), m_rfLC->getFLCO() == FLCO_GROUP ? "TG " : "", dst.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -738,14 +741,15 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
setShortLC(m_slotNo, m_netLC->getDstId(), m_netLC->getFLCO(), true);
|
||||
|
||||
std::string src = m_lookup->find(m_netLC->getSrcId());
|
||||
std::string dst = m_lookup->find(m_netLC->getDstId());
|
||||
|
||||
m_display->writeDMR(m_slotNo, src.c_str(), m_netLC->getFLCO() == FLCO_GROUP, m_netLC->getDstId(), "N");
|
||||
m_display->writeDMR(m_slotNo, src.c_str(), m_netLC->getFLCO() == FLCO_GROUP, dst.c_str(), "N");
|
||||
|
||||
#if defined(DUMP_DMR)
|
||||
openFile();
|
||||
writeFile(data);
|
||||
#endif
|
||||
LogMessage("DMR Slot %u, received network voice header from %s to %s%u", m_slotNo, src.c_str(), m_netLC->getFLCO() == FLCO_GROUP ? "TG " : "", m_netLC->getDstId());
|
||||
LogMessage("DMR Slot %u, received network voice header from %s to %s%s", m_slotNo, src.c_str(), m_netLC->getFLCO() == FLCO_GROUP ? "TG " : "", dst.c_str());
|
||||
} else if (dataType == DT_VOICE_PI_HEADER) {
|
||||
if (m_netState != RS_NET_AUDIO)
|
||||
return;
|
||||
|
@ -855,10 +859,11 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
setShortLC(m_slotNo, dmrData.getDstId(), gi ? FLCO_GROUP : FLCO_USER_USER, false);
|
||||
|
||||
std::string src = m_lookup->find(dmrData.getSrcId());
|
||||
std::string dst = m_lookup->find(dmrData.getDstId());
|
||||
|
||||
m_display->writeDMR(m_slotNo, src.c_str(), gi, dmrData.getDstId(), "N");
|
||||
m_display->writeDMR(m_slotNo, src.c_str(), gi, dst.c_str(), "N");
|
||||
|
||||
LogMessage("DMR Slot %u, received network data header from %s to %s%u, %u blocks", m_slotNo, src.c_str(), gi ? "TG ": "", dmrData.getDstId(), m_netFrames);
|
||||
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);
|
||||
} else if (dataType == DT_VOICE_SYNC) {
|
||||
if (m_netState == RS_NET_IDLE) {
|
||||
m_netLC = new CDMRLC(dmrData.getFLCO(), dmrData.getSrcId(), dmrData.getDstId());
|
||||
|
@ -882,10 +887,11 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||
setShortLC(m_slotNo, m_netLC->getDstId(), m_netLC->getFLCO(), true);
|
||||
|
||||
std::string src = m_lookup->find(m_netLC->getSrcId());
|
||||
std::string dst = m_lookup->find(m_netLC->getDstId());
|
||||
|
||||
m_display->writeDMR(m_slotNo, src.c_str(), m_netLC->getFLCO() == FLCO_GROUP, m_netLC->getDstId(), "N");
|
||||
m_display->writeDMR(m_slotNo, src.c_str(), m_netLC->getFLCO() == FLCO_GROUP, dst.c_str(), "N");
|
||||
|
||||
LogMessage("DMR Slot %u, received network late entry from %s to %s%u", m_slotNo, src.c_str(), m_netLC->getFLCO() == FLCO_GROUP ? "TG " : "", m_netLC->getDstId());
|
||||
LogMessage("DMR Slot %u, received network late entry from %s to %s%s", m_slotNo, src.c_str(), m_netLC->getFLCO() == FLCO_GROUP ? "TG " : "", dst.c_str());
|
||||
}
|
||||
|
||||
if (m_netState == RS_NET_AUDIO) {
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type) = 0;
|
||||
virtual void clearDStar() = 0;
|
||||
|
||||
virtual void writeDMR(unsigned int slotNo, const char* src, bool group, unsigned int dstId, const char* type) = 0;
|
||||
virtual void writeDMR(unsigned int slotNo, const char* src, bool group, const char* dst, const char* type) = 0;
|
||||
virtual void clearDMR(unsigned int slotNo) = 0;
|
||||
|
||||
virtual void writeFusion(const char* source, const char* dest) = 0;
|
||||
|
|
|
@ -160,7 +160,7 @@ void CHD44780::clearDStar()
|
|||
}
|
||||
}
|
||||
|
||||
void CHD44780::writeDMR(unsigned int slotNo, const char* src, bool group, unsigned int dstId, const char* type)
|
||||
void CHD44780::writeDMR(unsigned int slotNo, const char* src, bool group, const char* dst, const char* type)
|
||||
{
|
||||
assert(src != NULL);
|
||||
assert(type != NULL);
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type);
|
||||
virtual void clearDStar();
|
||||
|
||||
virtual void writeDMR(unsigned int slotNo, const char* src, bool group, unsigned int dstId, const char* type);
|
||||
virtual void writeDMR(unsigned int slotNo, const char* src, bool group, const char* dst, const char* type);
|
||||
virtual void clearDMR(unsigned int slotNo);
|
||||
|
||||
virtual void writeFusion(const char* source, const char* dest);
|
||||
|
|
|
@ -119,7 +119,7 @@ void CNextion::clearDStar()
|
|||
sendCommand("t1.txt=\"\"");
|
||||
}
|
||||
|
||||
void CNextion::writeDMR(unsigned int slotNo, const char* src, bool group, unsigned int dstId, const char* type)
|
||||
void CNextion::writeDMR(unsigned int slotNo, const char* src, bool group, const char* dst, const char* type)
|
||||
{
|
||||
assert(src != NULL);
|
||||
assert(type != NULL);
|
||||
|
@ -139,7 +139,7 @@ void CNextion::writeDMR(unsigned int slotNo, const char* src, bool group, unsign
|
|||
::sprintf(text, "t0.txt=\"1 %s %s\"", type, src);
|
||||
sendCommand(text);
|
||||
|
||||
::sprintf(text, "t1.txt=\"%s%u\"", group ? "TG" : "", dstId);
|
||||
::sprintf(text, "t1.txt=\"%s%s\"", group ? "TG" : "", dst);
|
||||
sendCommand(text);
|
||||
} else {
|
||||
char text[30U];
|
||||
|
@ -147,7 +147,7 @@ void CNextion::writeDMR(unsigned int slotNo, const char* src, bool group, unsign
|
|||
::sprintf(text, "t2.txt=\"2 %s %s\"", type, src);
|
||||
sendCommand(text);
|
||||
|
||||
::sprintf(text, "t3.txt=\"%s%u\"", group ? "TG" : "", dstId);
|
||||
::sprintf(text, "t3.txt=\"%s%s\"", group ? "TG" : "", dst);
|
||||
sendCommand(text);
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type);
|
||||
virtual void clearDStar();
|
||||
|
||||
virtual void writeDMR(unsigned int slotNo, const char* src, bool group, unsigned int dstId, const char* type);
|
||||
virtual void writeDMR(unsigned int slotNo, const char* src, bool group, const char* dst, const char* type);
|
||||
virtual void clearDMR(unsigned int slotNo);
|
||||
|
||||
virtual void writeFusion(const char* source, const char* dest);
|
||||
|
|
|
@ -51,7 +51,7 @@ void CNullDisplay::clearDStar()
|
|||
{
|
||||
}
|
||||
|
||||
void CNullDisplay::writeDMR(unsigned int slotNo, const char* src, bool group, unsigned int dstId, const char* type)
|
||||
void CNullDisplay::writeDMR(unsigned int slotNo, const char* src, bool group, const char* dst, const char* type)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type);
|
||||
virtual void clearDStar();
|
||||
|
||||
virtual void writeDMR(unsigned int slotNo, const char* src, bool group, unsigned int dstId, const char* type);
|
||||
virtual void writeDMR(unsigned int slotNo, const char* src, bool group, const char* dst, const char* type);
|
||||
virtual void clearDMR(unsigned int slotNo);
|
||||
|
||||
virtual void writeFusion(const char* source, const char* dest);
|
||||
|
|
|
@ -182,7 +182,7 @@ void CTFTSerial::clearDStar()
|
|||
displayText(" ");
|
||||
}
|
||||
|
||||
void CTFTSerial::writeDMR(unsigned int slotNo, const char* src, bool group, unsigned int dstId, const char* type)
|
||||
void CTFTSerial::writeDMR(unsigned int slotNo, const char* src, bool group, const char* dst, const char* type)
|
||||
{
|
||||
assert(src != NULL);
|
||||
assert(type != NULL);
|
||||
|
@ -212,7 +212,7 @@ void CTFTSerial::writeDMR(unsigned int slotNo, const char* src, bool group, unsi
|
|||
gotoPosPixel(5U, 55U);
|
||||
displayText(text);
|
||||
|
||||
::sprintf(text, "%s%u", group ? "TG" : "", dstId);
|
||||
::sprintf(text, "%s%s", group ? "TG" : "", dst);
|
||||
gotoPosPixel(65U, 72U);
|
||||
displayText(text);
|
||||
} else {
|
||||
|
@ -222,7 +222,7 @@ void CTFTSerial::writeDMR(unsigned int slotNo, const char* src, bool group, unsi
|
|||
gotoPosPixel(5U, 90U);
|
||||
displayText(text);
|
||||
|
||||
::sprintf(text, "%s%u", group ? "TG" : "", dstId);
|
||||
::sprintf(text, "%s%s", group ? "TG" : "", dst);
|
||||
gotoPosPixel(65U, 107U);
|
||||
displayText(text);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type);
|
||||
virtual void clearDStar();
|
||||
|
||||
virtual void writeDMR(unsigned int slotNo, const char* src, bool group, unsigned int dstId, const char* type);
|
||||
virtual void writeDMR(unsigned int slotNo, const char* src, bool group, const char* dst, const char* type);
|
||||
virtual void clearDMR(unsigned int slotNo);
|
||||
|
||||
virtual void writeFusion(const char* source, const char* dest);
|
||||
|
|
Loading…
Reference in a new issue