mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Add differentiation for 2.4" Nextion displays
This commit is contained in:
21
Nextion.cpp
21
Nextion.cpp
@@ -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);
|
::sprintf(text, "t0.txt=\"%s %.8s/%4.4s\"", type, my1, my2);
|
||||||
sendCommand(text);
|
sendCommand(text);
|
||||||
|
|
||||||
if (strcmp(reflector, " ") == 0) {
|
if (strcmp(m_size.c_str(), "2.4") == 0) {
|
||||||
::sprintf(text, "t1.txt=\"%.8s\"", your);
|
::sprintf(text, "t1.txt=\"%.8s\"", your);
|
||||||
} else {
|
sendCommand(text);
|
||||||
::sprintf(text, "t1.txt=\"%.8s <- %-8s\"", your, reflector);
|
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;
|
m_mode = MODE_DSTAR;
|
||||||
}
|
}
|
||||||
@@ -123,6 +133,9 @@ void CNextion::clearDStar()
|
|||||||
{
|
{
|
||||||
sendCommand("t0.txt=\"Listening\"");
|
sendCommand("t0.txt=\"Listening\"");
|
||||||
sendCommand("t1.txt=\"\"");
|
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)
|
void CNextion::writeDMR(unsigned int slotNo, const std::string& src, bool group, const std::string& dst, const char* type)
|
||||||
|
|||||||
Reference in New Issue
Block a user