Fix Nextion screen for long POCSAG messages.

This commit is contained in:
Jonathan Naylor 2018-06-20 19:58:35 +01:00
parent 2606f66260
commit 7ed8c9a214
1 changed files with 1 additions and 15 deletions

View File

@ -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);