diff --git a/HD44780.cpp b/HD44780.cpp index b5fbf8f..ec615b4 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -615,11 +615,11 @@ void CHD44780::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro void CHD44780::writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi) { - if (m_cols > 2) { + if (m_rows > 2) { if (slotNo == 1U) { if (m_rssiCount1 == 0U) { ::lcdPosition(m_fd, 0, 3); - ::lcdPrintf(m_fd, "S1:-%u""dBm", rssi); + ::lcdPrintf(m_fd, "%3u dBm", rssi); } m_rssiCount1++; @@ -628,7 +628,7 @@ void CHD44780::writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi) } else { if (m_rssiCount2 == 0U) { ::lcdPosition(m_fd, (m_cols / 2), 3); - ::lcdPrintf(m_fd, "S2:-%u""dBm", rssi); + ::lcdPrintf(m_fd, "%3u dBm", rssi); } m_rssiCount2++; @@ -650,9 +650,19 @@ void CHD44780::clearDMRInt(unsigned int slotNo) if (slotNo == 1U) { ::lcdPosition(m_fd, 0, (m_rows / 2) - 1); ::lcdPrintf(m_fd, "1 %.*s", m_cols - 2U, LISTENING); + + if (m_rows > 2) { // clear slot 1 RSSI + ::lcdPosition(m_fd, 0, 3); + ::lcdPrintf(m_fd, "%.*s", m_cols / 2, " "); + } } else { ::lcdPosition(m_fd, 0, (m_rows / 2)); ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); + + if (m_rows > 2) { // cleat slot 2 RSSI + ::lcdPosition(m_fd, m_cols / 2, 3); + ::lcdPrintf(m_fd, "%.*s", m_cols / 2, " "); + } } } else {