From 7ed8c9a21443d4573d38aa2d4f1e6ba1a6e24846 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 20 Jun 2018 19:58:35 +0100 Subject: [PATCH] Fix Nextion screen for long POCSAG messages. --- Nextion.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/Nextion.cpp b/Nextion.cpp index 059574e..9aeab7b 100644 --- a/Nextion.cpp +++ b/Nextion.cpp @@ -694,21 +694,7 @@ void CNextion::writePOCSAGInt(uint32_t ric, const std::string& message) sendCommand(text); sendCommandAction(132U); - // Convert the text to multi-line with \r characters between. - std::string display; - unsigned int n = 0U; - for (std::string::const_iterator it = message.cbegin(); it != message.cend(); ++it) { - char c = *it; - display.push_back(c); - n++; - - if (n == 16U) { - display.push_back('\r'); - n = 0U; - } - } - - ::sprintf(text, "t1.txt=\"%s\"", display.c_str()); + ::sprintf(text, "t1.txt=\"%s\"", message.c_str()); sendCommand(text); sendCommandAction(133U);