Skip to content

Commit

Permalink
Reflector output on Nextion displays
Browse files Browse the repository at this point in the history
  • Loading branch information
phl0 committed Apr 16, 2016
1 parent 961288e commit c4d5dd8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Nextion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ void CNextion::writeDStar(const char* my1, const char* my2, const char* your, co
assert(my2 != NULL);
assert(your != NULL);
assert(type != NULL);
assert(reflector != NULL);

if (m_mode != MODE_DSTAR)
sendCommand("page DStar");
Expand All @@ -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);
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);

m_mode = MODE_DSTAR;
Expand Down

0 comments on commit c4d5dd8

Please sign in to comment.