mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-22 08:05:49 +08:00
Add destination call lookup to display output as well
This commit is contained in:
12
DMRSlot.cpp
12
DMRSlot.cpp
@@ -179,7 +179,7 @@ void CDMRSlot::writeModem(unsigned char *data)
|
|||||||
|
|
||||||
if (m_netState == RS_NET_IDLE) {
|
if (m_netState == RS_NET_IDLE) {
|
||||||
setShortLC(m_slotNo, m_rfLC->getDstId(), m_rfLC->getFLCO(), true);
|
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());
|
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) {
|
if (m_netState == RS_NET_IDLE) {
|
||||||
setShortLC(m_slotNo, dstId, gi ? FLCO_GROUP : FLCO_USER_USER, false);
|
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);
|
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) {
|
if (m_netState == RS_NET_IDLE) {
|
||||||
setShortLC(m_slotNo, m_rfLC->getDstId(), m_rfLC->getFLCO(), true);
|
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());
|
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 src = m_lookup->find(m_netLC->getSrcId());
|
||||||
std::string dst = m_lookup->find(m_netLC->getDstId());
|
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)
|
#if defined(DUMP_DMR)
|
||||||
openFile();
|
openFile();
|
||||||
@@ -861,7 +861,7 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||||||
std::string src = m_lookup->find(dmrData.getSrcId());
|
std::string src = m_lookup->find(dmrData.getSrcId());
|
||||||
std::string dst = m_lookup->find(dmrData.getDstId());
|
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);
|
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) {
|
} 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 src = m_lookup->find(m_netLC->getSrcId());
|
||||||
std::string dst = m_lookup->find(m_netLC->getDstId());
|
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());
|
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());
|
||||||
}
|
}
|
||||||
|
|||||||
10
HD44780.cpp
10
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(src != NULL);
|
||||||
assert(type != NULL);
|
assert(type != NULL);
|
||||||
@@ -179,18 +179,18 @@ void CHD44780::writeDMR(unsigned int slotNo, const char* src, bool group, unsign
|
|||||||
if (slotNo == 1U) {
|
if (slotNo == 1U) {
|
||||||
char buffer[40U];
|
char buffer[40U];
|
||||||
if (m_cols > 16U)
|
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
|
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);
|
::lcdPosition(m_fd, 0, m_rows > 2U ? 1 : 0);
|
||||||
::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, buffer);
|
::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, buffer);
|
||||||
} else {
|
} else {
|
||||||
char buffer[40U];
|
char buffer[40U];
|
||||||
if (m_cols > 16U)
|
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
|
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);
|
::lcdPosition(m_fd, 0, m_rows > 2U ? 2 : 1);
|
||||||
::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer);
|
::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public:
|
|||||||
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type);
|
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type);
|
||||||
virtual void clearDStar();
|
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 clearDMR(unsigned int slotNo);
|
||||||
|
|
||||||
virtual void writeFusion(const char* source, const char* dest);
|
virtual void writeFusion(const char* source, const char* dest);
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ void CNextion::clearDStar()
|
|||||||
sendCommand("t1.txt=\"\"");
|
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(src != NULL);
|
||||||
assert(type != 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);
|
::sprintf(text, "t0.txt=\"1 %s %s\"", type, src);
|
||||||
sendCommand(text);
|
sendCommand(text);
|
||||||
|
|
||||||
::sprintf(text, "t1.txt=\"%s%u\"", group ? "TG" : "", dstId);
|
::sprintf(text, "t1.txt=\"%s%s\"", group ? "TG" : "", dst);
|
||||||
sendCommand(text);
|
sendCommand(text);
|
||||||
} else {
|
} else {
|
||||||
char text[30U];
|
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);
|
::sprintf(text, "t2.txt=\"2 %s %s\"", type, src);
|
||||||
sendCommand(text);
|
sendCommand(text);
|
||||||
|
|
||||||
::sprintf(text, "t3.txt=\"%s%u\"", group ? "TG" : "", dstId);
|
::sprintf(text, "t3.txt=\"%s%s\"", group ? "TG" : "", dst);
|
||||||
sendCommand(text);
|
sendCommand(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public:
|
|||||||
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type);
|
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type);
|
||||||
virtual void clearDStar();
|
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 clearDMR(unsigned int slotNo);
|
||||||
|
|
||||||
virtual void writeFusion(const char* source, const char* dest);
|
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 writeDStar(const char* my1, const char* my2, const char* your, const char* type);
|
||||||
virtual void clearDStar();
|
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 clearDMR(unsigned int slotNo);
|
||||||
|
|
||||||
virtual void writeFusion(const char* source, const char* dest);
|
virtual void writeFusion(const char* source, const char* dest);
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ void CTFTSerial::clearDStar()
|
|||||||
displayText(" ");
|
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(src != NULL);
|
||||||
assert(type != NULL);
|
assert(type != NULL);
|
||||||
@@ -212,7 +212,7 @@ void CTFTSerial::writeDMR(unsigned int slotNo, const char* src, bool group, unsi
|
|||||||
gotoPosPixel(5U, 55U);
|
gotoPosPixel(5U, 55U);
|
||||||
displayText(text);
|
displayText(text);
|
||||||
|
|
||||||
::sprintf(text, "%s%u", group ? "TG" : "", dstId);
|
::sprintf(text, "%s%s", group ? "TG" : "", dst);
|
||||||
gotoPosPixel(65U, 72U);
|
gotoPosPixel(65U, 72U);
|
||||||
displayText(text);
|
displayText(text);
|
||||||
} else {
|
} else {
|
||||||
@@ -222,7 +222,7 @@ void CTFTSerial::writeDMR(unsigned int slotNo, const char* src, bool group, unsi
|
|||||||
gotoPosPixel(5U, 90U);
|
gotoPosPixel(5U, 90U);
|
||||||
displayText(text);
|
displayText(text);
|
||||||
|
|
||||||
::sprintf(text, "%s%u", group ? "TG" : "", dstId);
|
::sprintf(text, "%s%s", group ? "TG" : "", dst);
|
||||||
gotoPosPixel(65U, 107U);
|
gotoPosPixel(65U, 107U);
|
||||||
displayText(text);
|
displayText(text);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public:
|
|||||||
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type);
|
virtual void writeDStar(const char* my1, const char* my2, const char* your, const char* type);
|
||||||
virtual void clearDStar();
|
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 clearDMR(unsigned int slotNo);
|
||||||
|
|
||||||
virtual void writeFusion(const char* source, const char* dest);
|
virtual void writeFusion(const char* source, const char* dest);
|
||||||
|
|||||||
Reference in New Issue
Block a user