mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-24 01:25:41 +08:00
C++ cleanups
This commit is contained in:
20
Nextion.cpp
20
Nextion.cpp
@@ -109,26 +109,25 @@ 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(m_size.c_str(), "2.4") == 0) {
|
||||
if (m_size == "2.4") {
|
||||
::sprintf(text, "t1.txt=\"%.8s\"", your);
|
||||
sendCommand(text);
|
||||
if (strcmp(reflector, " ") != 0) {
|
||||
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 (m_size == "3.2") {
|
||||
::sprintf(text, "t1.txt=\"%.8s\"", your);
|
||||
sendCommand(text);
|
||||
if (strcmp(reflector, " ") != 0) {
|
||||
if (::strcmp(reflector, " ") != 0) {
|
||||
::sprintf(text, "t2.txt=\"via %.8s\"", reflector);
|
||||
sendCommand(text);
|
||||
}
|
||||
} else if (strcmp(m_size.c_str(), "3.5") == 0) {
|
||||
if (strcmp(reflector, " ") == 0) {
|
||||
} else if (m_size == "3.5") {
|
||||
if (::strcmp(reflector, " ") == 0)
|
||||
::sprintf(text, "t1.txt=\"%.8s\"", your);
|
||||
} else {
|
||||
else
|
||||
::sprintf(text, "t1.txt=\"%.8s <- %-8s\"", your, reflector);
|
||||
}
|
||||
sendCommand(text);
|
||||
}
|
||||
|
||||
@@ -139,11 +138,8 @@ void CNextion::clearDStar()
|
||||
{
|
||||
sendCommand("t0.txt=\"Listening\"");
|
||||
sendCommand("t1.txt=\"\"");
|
||||
if (strcmp(m_size.c_str(), "2.4") == 0) {
|
||||
if (m_size == "2.4" || m_size == "3.2")
|
||||
sendCommand("t2.txt=\"\"");
|
||||
} else if (strcmp(m_size.c_str(), "3.2") == 0) {
|
||||
sendCommand("t2.txt=\"\"");
|
||||
}
|
||||
}
|
||||
|
||||
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