From 9c59294c23dca040ae2d522c0c564c57fea70d4b Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 12 Apr 2016 17:46:48 +0100 Subject: [PATCH] Add extra commits and hopefully fix missing line on HD44780 in DMR mode, --- HD44780.cpp | 15 ++++++++------- Nextion.cpp | 1 + TFTSerial.cpp | 1 + 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/HD44780.cpp b/HD44780.cpp index 9814cb1..7a5964c 100644 --- a/HD44780.cpp +++ b/HD44780.cpp @@ -112,6 +112,7 @@ void CHD44780::writeDStar(const char* my1, const char* my2, const char* your, co assert(my1 != NULL); assert(my2 != NULL); assert(your != NULL); + assert(type != NULL); ::lcdClear(m_fd); @@ -157,14 +158,14 @@ void CHD44780::writeDMR(unsigned int slotNo, unsigned int srcId, bool group, uns { assert(type != NULL); - ::lcdClear(m_fd); - - if (m_rows > 2U) { - ::lcdPosition(m_fd, 0, 0); - ::lcdPuts(m_fd, "DMR"); - } - if (!m_dmr) { + ::lcdClear(m_fd); + + if (m_rows > 2U) { + ::lcdPosition(m_fd, 0, 0); + ::lcdPuts(m_fd, "DMR"); + } + if (slotNo == 1U) { ::lcdPosition(m_fd, 0, m_rows > 2U ? 2 : 1); ::lcdPrintf(m_fd, "2 %.*s", m_cols - 2U, LISTENING); diff --git a/Nextion.cpp b/Nextion.cpp index a4bd0e9..86b9ca5 100644 --- a/Nextion.cpp +++ b/Nextion.cpp @@ -98,6 +98,7 @@ void CNextion::writeDStar(const char* my1, const char* my2, const char* your, co assert(my1 != NULL); assert(my2 != NULL); assert(your != NULL); + assert(type != NULL); if (m_mode != MODE_DSTAR) sendCommand("page DStar"); diff --git a/TFTSerial.cpp b/TFTSerial.cpp index a2b02ea..ed1bfba 100644 --- a/TFTSerial.cpp +++ b/TFTSerial.cpp @@ -147,6 +147,7 @@ void CTFTSerial::writeDStar(const char* my1, const char* my2, const char* your, assert(my1 != NULL); assert(my2 != NULL); assert(your != NULL); + assert(type != NULL); if (m_mode != MODE_DSTAR) { // Clear the screen