From 5e04dc1fd7500453307b646901a7f181358c1eeb Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 14 Apr 2016 22:44:42 +0200 Subject: [PATCH 01/10] Change writeDStar function to explicit sizes --- HD44780.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/HD44780.cpp b/HD44780.cpp index 88982f2..34ce895 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -119,9 +119,13 @@ void CHD44780::writeDStar(const char* my1, const char* my2, const char* your, co ::lcdPosition(m_fd, 0, 0); ::lcdPuts(m_fd, "D-Star"); - if (m_rows > 2U) { - char buffer[40U]; - + if (m_rows == 2U && m_cols == 16U) { + char buffer[16U]; + ::sprintf(buffer, "%s %.8s/%.4s", type, my1, my2); + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "%.*s", m_cols, buffer); + } else if (m_rows == 4U && m_cols == 20U) { + char buffer[20U]; ::sprintf(buffer, "%s %.8s/%.4s >", type, my1, my2); ::lcdPosition(m_fd, 0, 1); ::lcdPrintf(m_fd, "%.*s", m_cols, buffer); @@ -129,10 +133,9 @@ void CHD44780::writeDStar(const char* my1, const char* my2, const char* your, co ::sprintf(buffer, "%.8s", your); ::lcdPosition(m_fd, 0, 2); ::lcdPrintf(m_fd, "%.*s", m_cols, buffer); - } else { + } else if (m_rows == 2 && m_cols == 40U) { char buffer[40U]; ::sprintf(buffer, "%s %.8s/%.4s > %.8s", type, my1, my2, your); - ::lcdPosition(m_fd, 0, 1); ::lcdPrintf(m_fd, "%.*s", m_cols, buffer); } From 14aae85c7e2ca2279d4f0db0d8fa6168dd79ed36 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 14 Apr 2016 22:52:03 +0200 Subject: [PATCH 02/10] Change display sizes for clearDStar function --- HD44780.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/HD44780.cpp b/HD44780.cpp index 34ce895..953eda1 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -25,7 +25,7 @@ #include #include -const char* LISTENING = "Listening "; +const char* LISTENING = "Listening "; CHD44780::CHD44780(unsigned int rows, unsigned int cols, const char* callsign, unsigned int dmrid, const std::vector& pins) : m_rows(rows), @@ -145,13 +145,16 @@ void CHD44780::writeDStar(const char* my1, const char* my2, const char* your, co void CHD44780::clearDStar() { - if (m_rows > 2U) { + if (m_rows == 2U && m_cols == 16U) { + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "%.*s", m_cols, LISTENING); + } else if (m_rows == 4U && m_cols == 20U) { ::lcdPosition(m_fd, 0, 1); ::lcdPrintf(m_fd, "%.*s", m_cols, LISTENING); ::lcdPosition(m_fd, 0, 2); - ::lcdPrintf(m_fd, "%.*s", m_cols, " "); - } else { + ::lcdPrintf(m_fd, "%.*s", m_cols, " "); + } else if (m_rows == 2 && m_cols == 40U) { ::lcdPosition(m_fd, 0, 1); ::lcdPrintf(m_fd, "%.*s", m_cols, LISTENING); } From bced1c421453466909c32e23447e909afbcab810 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 14 Apr 2016 22:57:23 +0200 Subject: [PATCH 03/10] Change writeFusion function to explicit display sizes --- HD44780.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/HD44780.cpp b/HD44780.cpp index 953eda1..9c56e2e 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -249,13 +249,16 @@ void CHD44780::writeFusion(const char* source, const char* dest) void CHD44780::clearFusion() { - if (m_rows > 2U) { + if (m_rows == 2U && m_cols == 16U) { + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "%.*s", m_cols, LISTENING); + } else if (m_rows == 4U && m_cols == 20U) { ::lcdPosition(m_fd, 0, 1); ::lcdPrintf(m_fd, "%.*s", m_cols, LISTENING); ::lcdPosition(m_fd, 0, 2); - ::lcdPrintf(m_fd, "%.*s", m_cols, ""); - } else { + ::lcdPrintf(m_fd, "%.*s", m_cols, " "); + } else if (m_rows == 2 && m_cols == 40U) { ::lcdPosition(m_fd, 0, 1); ::lcdPrintf(m_fd, "%.*s", m_cols, LISTENING); } From c0be38a34ea218a743168cf7591cca20a2c318ae Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 14 Apr 2016 23:01:04 +0200 Subject: [PATCH 04/10] Change writeFusion to explicit display sizes --- HD44780.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/HD44780.cpp b/HD44780.cpp index 9c56e2e..e87ea30 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -226,9 +226,13 @@ void CHD44780::writeFusion(const char* source, const char* dest) ::lcdPosition(m_fd, 0, 0); ::lcdPuts(m_fd, "System Fusion"); - if (m_rows > 2U) { - char buffer[40U]; - + if (m_rows == 2U && m_cols == 16U) { + char buffer[16U]; + ::sprintf(buffer, "%.10s >", source); + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "%.*s", m_cols, buffer); + } else if (m_rows == 4U && m_cols == 20U) { + char buffer[20U]; ::sprintf(buffer, "%.10s >", source); ::lcdPosition(m_fd, 0, 1); ::lcdPrintf(m_fd, "%.*s", m_cols, buffer); @@ -236,7 +240,7 @@ void CHD44780::writeFusion(const char* source, const char* dest) ::sprintf(buffer, "%.10s", dest); ::lcdPosition(m_fd, 0, 2); ::lcdPrintf(m_fd, "%.*s", m_cols, buffer); - } else { + } else if (m_rows == 2 && m_cols == 40U) { char buffer[40U]; ::sprintf(buffer, "%.10s > %.10s", source, dest); From b32eb55083b7f60a93f7509a92304ca23d1d7c02 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 14 Apr 2016 23:09:00 +0200 Subject: [PATCH 05/10] Change clearDMR function to explicit display sizes --- HD44780.cpp | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/HD44780.cpp b/HD44780.cpp index e87ea30..9a60970 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -207,12 +207,39 @@ void CHD44780::writeDMR(unsigned int slotNo, const char* src, bool group, unsign void CHD44780::clearDMR(unsigned int slotNo) { - if (slotNo == 1U) { - ::lcdPosition(m_fd, 0, m_rows > 2U ? 1 : 0); - ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); - } else { - ::lcdPosition(m_fd, 0, m_rows > 2U ? 2 : 1); - ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); + if (m_rows == 2U && m_cols == 16U) { + if (slotNo == 1U) { + ::lcdPosition(m_fd, 0, 0); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + } else { + ::lcdPosition(m_fd, 0, 0); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); + } + } else if (m_rows == 4U && m_cols == 20U) { + if (slotNo == 1U) { + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + } else { + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + + ::lcdPosition(m_fd, 0, 2); + ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); + } + } else if (m_rows == 2 && m_cols == 40U) { + if (slotNo == 1U) { + ::lcdPosition(m_fd, 0, 0); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + } else { + ::lcdPosition(m_fd, 0, 0); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); + } } } From ebe33ceb24131df68a28def974228166ba49ddaf Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 14 Apr 2016 23:21:52 +0200 Subject: [PATCH 06/10] Change firs halt of writeDMR function --- HD44780.cpp | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/HD44780.cpp b/HD44780.cpp index 9a60970..d8e8c2f 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -168,17 +168,41 @@ void CHD44780::writeDMR(unsigned int slotNo, const char* src, bool group, unsign if (!m_dmr) { ::lcdClear(m_fd); - if (m_rows > 2U) { + if (m_rows == 2U && m_cols == 16U) { + if (slotNo == 1U) { + ::lcdPosition(m_fd, 0, 0); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + } else { + ::lcdPosition(m_fd, 0, 0); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); + } + } else if (m_rows == 4U && m_cols == 20U) { ::lcdPosition(m_fd, 0, 0); ::lcdPuts(m_fd, "DMR"); - } + if (slotNo == 1U) { + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + } else { + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); - if (slotNo == 1U) { - ::lcdPosition(m_fd, 0, m_rows > 2U ? 2 : 1); - ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); - } else { - ::lcdPosition(m_fd, 0, m_rows > 2U ? 1 : 0); - ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + ::lcdPosition(m_fd, 0, 2); + ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); + } + } else if (m_rows == 2 && m_cols == 40U) { + if (slotNo == 1U) { + ::lcdPosition(m_fd, 0, 0); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + } else { + ::lcdPosition(m_fd, 0, 0); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); + } } } From a34d5c43d0bdb4e5baa3862277c373aa2d4a146a Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 14 Apr 2016 23:31:57 +0200 Subject: [PATCH 07/10] Changed second half of writeDMR function --- HD44780.cpp | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/HD44780.cpp b/HD44780.cpp index d8e8c2f..800a671 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -206,24 +206,39 @@ 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); - else + if (m_rows == 2U && m_cols == 16U) { + char buffer[16U]; + if (slotNo == 1U) { ::sprintf(buffer, "%s > %s%u", src, group ? "TG" : "", dstId); - - ::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); - else + ::lcdPosition(m_fd, 0, 0); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, buffer); + } else { ::sprintf(buffer, "%s > %s%u", src, group ? "TG" : "", dstId); - - ::lcdPosition(m_fd, 0, m_rows > 2U ? 2 : 1); - ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer); + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer); + } + } else if (m_rows == 4U && m_cols == 20U) { + char buffer[20U]; + if (slotNo == 1U) { + ::sprintf(buffer, "%s %s > %s%u", type, src, group ? "TG" : "", dstId); + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, buffer); + } else { + ::sprintf(buffer, "%s %s > %s%u", type, src, group ? "TG" : "", dstId); + ::lcdPosition(m_fd, 0, 2); + ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer); + } + } else if (m_rows == 2 && m_cols == 40U) { + char buffer[40U]; + if (slotNo == 1U) { + ::sprintf(buffer, "%s %s > %s%u", type, src, group ? "TG" : "", dstId); + ::lcdPosition(m_fd, 0, 0); + ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, buffer); + } else { + ::sprintf(buffer, "%s %s > %s%u", type, src, group ? "TG" : "", dstId); + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer); + } } m_dmr = true; From 771fa606a0a1594f054dbaf71fcf6038480a638e Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 14 Apr 2016 23:57:20 +0200 Subject: [PATCH 08/10] Corrected comparisons on rows/cols --- HD44780.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/HD44780.cpp b/HD44780.cpp index 800a671..8dc6948 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -192,7 +192,7 @@ void CHD44780::writeDMR(unsigned int slotNo, const char* src, bool group, unsign ::lcdPosition(m_fd, 0, 2); ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); } - } else if (m_rows == 2 && m_cols == 40U) { + } else if (m_rows == 2U && m_cols == 40U) { if (slotNo == 1U) { ::lcdPosition(m_fd, 0, 0); ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); @@ -228,7 +228,7 @@ void CHD44780::writeDMR(unsigned int slotNo, const char* src, bool group, unsign ::lcdPosition(m_fd, 0, 2); ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer); } - } else if (m_rows == 2 && m_cols == 40U) { + } else if (m_rows == 2U && m_cols == 40U) { char buffer[40U]; if (slotNo == 1U) { ::sprintf(buffer, "%s %s > %s%u", type, src, group ? "TG" : "", dstId); @@ -268,7 +268,7 @@ void CHD44780::clearDMR(unsigned int slotNo) ::lcdPosition(m_fd, 0, 2); ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); } - } else if (m_rows == 2 && m_cols == 40U) { + } else if (m_rows == 2U && m_cols == 40U) { if (slotNo == 1U) { ::lcdPosition(m_fd, 0, 0); ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); From a8cd27f0a0f9ef4376b5aa332f2e491ac1cec765 Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 15 Apr 2016 13:40:57 +0200 Subject: [PATCH 09/10] Corrected swappin of line numbers --- HD44780.cpp | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/HD44780.cpp b/HD44780.cpp index 8dc6948..7e7b874 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -170,38 +170,30 @@ void CHD44780::writeDMR(unsigned int slotNo, const char* src, bool group, unsign if (m_rows == 2U && m_cols == 16U) { if (slotNo == 1U) { - ::lcdPosition(m_fd, 0, 0); - ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); } else { ::lcdPosition(m_fd, 0, 0); ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); - ::lcdPosition(m_fd, 0, 1); - ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); } } else if (m_rows == 4U && m_cols == 20U) { ::lcdPosition(m_fd, 0, 0); ::lcdPuts(m_fd, "DMR"); if (slotNo == 1U) { - ::lcdPosition(m_fd, 0, 1); - ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + ::lcdPosition(m_fd, 0, 2); + ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); } else { ::lcdPosition(m_fd, 0, 1); ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); - - ::lcdPosition(m_fd, 0, 2); - ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); } } else if (m_rows == 2U && m_cols == 40U) { if (slotNo == 1U) { - ::lcdPosition(m_fd, 0, 0); - ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + ::lcdPosition(m_fd, 0, 1); + ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); } else { ::lcdPosition(m_fd, 0, 0); ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); - - ::lcdPosition(m_fd, 0, 1); - ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); } } } @@ -251,9 +243,6 @@ void CHD44780::clearDMR(unsigned int slotNo) ::lcdPosition(m_fd, 0, 0); ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); } else { - ::lcdPosition(m_fd, 0, 0); - ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); - ::lcdPosition(m_fd, 0, 1); ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); } @@ -262,9 +251,6 @@ void CHD44780::clearDMR(unsigned int slotNo) ::lcdPosition(m_fd, 0, 1); ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); } else { - ::lcdPosition(m_fd, 0, 1); - ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); - ::lcdPosition(m_fd, 0, 2); ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); } @@ -273,9 +259,6 @@ void CHD44780::clearDMR(unsigned int slotNo) ::lcdPosition(m_fd, 0, 0); ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); } else { - ::lcdPosition(m_fd, 0, 0); - ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); - ::lcdPosition(m_fd, 0, 1); ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); } From eeb6d0a57ee7a6cbafca46fccf56109850cefa2e Mon Sep 17 00:00:00 2001 From: DF2ET Date: Sat, 16 Apr 2016 10:28:45 +0000 Subject: [PATCH 10/10] Changed variable dst to string --- HD44780.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/HD44780.cpp b/HD44780.cpp index fd61759..80f5a45 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -201,33 +201,33 @@ void CHD44780::writeDMR(unsigned int slotNo, const char* src, bool group, const if (m_rows == 2U && m_cols == 16U) { char buffer[16U]; if (slotNo == 1U) { - ::sprintf(buffer, "%s > %s%u", src, group ? "TG" : "", dstId); + ::sprintf(buffer, "%s > %s%s", src, group ? "TG" : "", dst); ::lcdPosition(m_fd, 0, 0); ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, buffer); } else { - ::sprintf(buffer, "%s > %s%u", src, group ? "TG" : "", dstId); + ::sprintf(buffer, "%s > %s%s", src, group ? "TG" : "", dst); ::lcdPosition(m_fd, 0, 1); ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer); } } else if (m_rows == 4U && m_cols == 20U) { char buffer[20U]; if (slotNo == 1U) { - ::sprintf(buffer, "%s %s > %s%u", type, src, group ? "TG" : "", dstId); + ::sprintf(buffer, "%s %s > %s%s", type, src, group ? "TG" : "", dst); ::lcdPosition(m_fd, 0, 1); ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, buffer); } else { - ::sprintf(buffer, "%s %s > %s%u", type, src, group ? "TG" : "", dstId); + ::sprintf(buffer, "%s %s > %s%s", type, src, group ? "TG" : "", dst); ::lcdPosition(m_fd, 0, 2); ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer); } } else if (m_rows == 2U && m_cols == 40U) { char buffer[40U]; if (slotNo == 1U) { - ::sprintf(buffer, "%s %s > %s%u", type, src, group ? "TG" : "", dstId); + ::sprintf(buffer, "%s %s > %s%s", type, src, group ? "TG" : "", dst); ::lcdPosition(m_fd, 0, 0); ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, buffer); } else { - ::sprintf(buffer, "%s %s > %s%u", type, src, group ? "TG" : "", dstId); + ::sprintf(buffer, "%s %s > %s%s", type, src, group ? "TG" : "", dst); ::lcdPosition(m_fd, 0, 1); ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, buffer); }