Better way to send to display that MMDVMHost is quitting

This commit is contained in:
root
2018-08-15 18:17:42 +02:00
parent df2b27f585
commit 64e3ae6d30
16 changed files with 124 additions and 5 deletions

View File

@@ -165,6 +165,27 @@ void CNextion::setLockoutInt()
m_mode = MODE_LOCKOUT;
}
void CNextion::setQuitInt()
{
sendCommand("page MMDVM");
sendCommandAction(1U);
char command[100];
::sprintf(command, "dim=%u", m_idleBrightness);
sendCommand(command);
::sprintf(command, "t3.txt=\"%s\"", m_ipaddress.c_str());
sendCommand(command);
sendCommandAction(16U);
sendCommand("t0.txt=\"MMDVM STOPPED\"");
sendCommandAction(19U);
m_clockDisplayTimer.stop();
m_mode = MODE_QUIT;
}
void CNextion::writeDStarInt(const char* my1, const char* my2, const char* your, const char* type, const char* reflector)
{
assert(my1 != NULL);
@@ -750,10 +771,6 @@ void CNextion::clockInt(unsigned int ms)
void CNextion::close()
{
sendCommand("page MMDVM");
sendCommandAction(1U);
sendCommand("t1.txt=\"MMDVM STOPPED\"");
sendCommandAction(19U);
m_serial->close();
delete m_serial;
}