From e8010a4515032cd1a268c8aab1567e99d8f3dc67 Mon Sep 17 00:00:00 2001 From: Tony Corbett G0WFV Date: Sat, 7 Jan 2017 11:40:26 +0000 Subject: [PATCH] More HD44780 RSSI fettling --- HD44780.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/HD44780.cpp b/HD44780.cpp index 2ed780e..c5c25ce 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -650,13 +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); - ::lcdPosition(m_fd, 0, 3); - ::lcdPrintf(m_fd, "%.*s", m_cols / 2, " "); + + 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); - ::lcdPosition(m_fd, m_cols / 2, 3); - ::lcdPrintf(m_fd, "%.*s", m_cols / 2, " "); + + if (m_rows > 2) { // cleat slot 2 RSSI + ::lcdPosition(m_fd, m_cols / 2, 3); + ::lcdPrintf(m_fd, "%.*s", m_cols / 2, " "); + } } } else {