diff --git a/DMRSlot.cpp b/DMRSlot.cpp index 4e46329..2d1bcac 100644 --- a/DMRSlot.cpp +++ b/DMRSlot.cpp @@ -179,7 +179,7 @@ void CDMRSlot::writeModem(unsigned char *data) 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%s", m_slotNo, src.c_str(), m_rfLC->getFLCO() == FLCO_GROUP ? "TG " : "", dst.c_str()); @@ -289,7 +289,7 @@ void CDMRSlot::writeModem(unsigned char *data) 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%s, %u blocks", m_slotNo, src.c_str(), gi ? "TG ": "", dst.c_str(), m_rfFrames); @@ -565,7 +565,7 @@ void CDMRSlot::writeModem(unsigned char *data) 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%s", m_slotNo, src.c_str(), m_rfLC->getFLCO() == FLCO_GROUP ? "TG " : "", dst.c_str()); @@ -743,7 +743,7 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData) 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(); @@ -861,7 +861,7 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData) 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%s, %u blocks", m_slotNo, src.c_str(), gi ? "TG ": "", dst.c_str(), m_netFrames); } else if (dataType == DT_VOICE_SYNC) { @@ -889,7 +889,7 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData) 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%s", m_slotNo, src.c_str(), m_netLC->getFLCO() == FLCO_GROUP ? "TG " : "", dst.c_str()); } diff --git a/HD44780.cpp b/HD44780.cpp index 88982f2..bed7cb7 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -154,7 +154,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); @@ -179,18 +179,18 @@ void CHD44780::writeDMR(unsigned int slotNo, const char* src, bool group, unsign if (slotNo == 1U) { char buffer[40U]; if (m_cols > 16U) - ::sprintf(buffer, "%s %s > %s%u", type, src, group ? "TG" : "", dstId); + ::sprintf(buffer, "%s %s > %s%s", type, src, group ? "TG" : "", dst); else - ::sprintf(buffer, "%s > %s%u", src, group ? "TG" : "", dstId); + ::sprintf(buffer, "%s > %s%s", src, group ? "TG" : "", dst); ::lcdPosition(m_fd, 0, m_rows > 2U ? 1 : 0); ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, buffer); } else { char buffer[40U]; if (m_cols > 16U) - ::sprintf(buffer, "%s %s > %s%u", type, src, group ? "TG" : "", dstId); + ::sprintf(buffer, "%s %s > %s%s", type, src, group ? "TG" : "", dst); else - ::sprintf(buffer, "%s > %s%u", src, group ? "TG" : "", dstId); + ::sprintf(buffer, "%s > %s%s", src, group ? "TG" : "", dst); ::lcdPosition(m_fd, 0, m_rows > 2U ? 2 : 1); ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer); diff --git a/HD44780.h b/HD44780.h index 550cc1b..1241d14 100644 --- a/HD44780.h +++ b/HD44780.h @@ -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); diff --git a/Nextion.cpp b/Nextion.cpp index c513eea..d4ef953 100644 --- a/Nextion.cpp +++ b/Nextion.cpp @@ -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); } diff --git a/Nextion.h b/Nextion.h index f0a9108..fafb37a 100644 --- a/Nextion.h +++ b/Nextion.h @@ -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); diff --git a/NullDisplay.cpp b/NullDisplay.cpp index 7398946..2841110 100644 --- a/NullDisplay.cpp +++ b/NullDisplay.cpp @@ -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) { } diff --git a/NullDisplay.h b/NullDisplay.h index aaa25c9..92acf58 100644 --- a/NullDisplay.h +++ b/NullDisplay.h @@ -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); diff --git a/TFTSerial.cpp b/TFTSerial.cpp index 193300e..632e96b 100644 --- a/TFTSerial.cpp +++ b/TFTSerial.cpp @@ -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); } diff --git a/TFTSerial.h b/TFTSerial.h index 1847815..da54623 100644 --- a/TFTSerial.h +++ b/TFTSerial.h @@ -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);