Update the display code for P25.

This commit is contained in:
Jonathan Naylor
2016-09-12 18:12:32 +01:00
parent 3079c9faf2
commit e2ec5292b5
12 changed files with 241 additions and 0 deletions

View File

@@ -233,6 +233,37 @@ void CNextion::clearFusionInt()
sendCommand("t2.txt=\"\"");
}
void CNextion::writeP25Int(const char* source, bool group, const char* dest, const char* type)
{
assert(source != NULL);
assert(dest != NULL);
assert(type != NULL);
if (m_mode != MODE_P25)
sendCommand("page P25");
char text[30U];
::sprintf(text, "dim=%u", m_brightness);
sendCommand(text);
::sprintf(text, "t0.txt=\"%s %.10s\"", type, source);
sendCommand(text);
::sprintf(text, "t1.txt=\"%s%.10s\"", group ? "TG" : "", dest);
sendCommand(text);
m_clockDisplayTimer.stop();
m_mode = MODE_P25;
}
void CNextion::clearP25Int()
{
sendCommand("t0.txt=\"Listening\"");
sendCommand("t1.txt=\"\"");
sendCommand("t2.txt=\"\"");
}
void CNextion::clockInt(unsigned int ms)
{
// Update the clock display in IDLE mode every 400ms