Add differentiation for 2.4" Nextion displays

This commit is contained in:
phl0 2016-04-27 21:48:20 +02:00
parent f47456ae0b
commit 6fccc3af74
No known key found for this signature in database
GPG key ID: 48EA1E640798CA9A

View file

@ -109,12 +109,22 @@ 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);
if (strcmp(reflector, " ") == 0) {
if (strcmp(m_size.c_str(), "2.4") == 0) {
::sprintf(text, "t1.txt=\"%.8s\"", your);
} else {
::sprintf(text, "t1.txt=\"%.8s <- %-8s\"", your, reflector);
sendCommand(text);
if (strcmp(reflector, " ") == 0) {
::sprintf(text, "t2.txt=\"via %.8s\"", reflector);
sendCommand(text);
}
} else if (strcmp(m_size.c_str(), "3.2") == 0) {
} else if (strcmp(m_size.c_str(), "3.5") == 0) {
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;
}
@ -123,6 +133,9 @@ void CNextion::clearDStar()
{
sendCommand("t0.txt=\"Listening\"");
sendCommand("t1.txt=\"\"");
if (strcmp(m_size.c_str(), "2.4") == 0) {
sendCommand("t2.txt=\"\"");
}
}
void CNextion::writeDMR(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type)