Reflector output on Nextion displays

This commit is contained in:
phl0
2016-04-16 22:20:18 +02:00
parent 961288ed90
commit c4d5dd870e

View File

@@ -99,6 +99,7 @@ void CNextion::writeDStar(const char* my1, const char* my2, const char* your, co
assert(my2 != NULL); assert(my2 != NULL);
assert(your != NULL); assert(your != NULL);
assert(type != NULL); assert(type != NULL);
assert(reflector != NULL);
if (m_mode != MODE_DSTAR) if (m_mode != MODE_DSTAR)
sendCommand("page DStar"); sendCommand("page DStar");
@@ -107,7 +108,11 @@ void CNextion::writeDStar(const char* my1, const char* my2, const char* your, co
::sprintf(text, "t0.txt=\"%s %.8s/%4.4s\"", type, my1, my2); ::sprintf(text, "t0.txt=\"%s %.8s/%4.4s\"", type, my1, my2);
sendCommand(text); sendCommand(text);
::sprintf(text, "t1.txt=\"%.8s\"", your); if (strcmp(reflector, " ") == 0) {
::sprintf(text, "t1.txt=\"%.8s\"", your);
} else {
::sprintf(text, "t1.txt=\"%.8s <- %-8s\"", your, reflector);
}
sendCommand(text); sendCommand(text);
m_mode = MODE_DSTAR; m_mode = MODE_DSTAR;