From bced1c421453466909c32e23447e909afbcab810 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 14 Apr 2016 22:57:23 +0200 Subject: [PATCH] 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); }