mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 06:55:52 +08:00
Update the display code for P25.
This commit is contained in:
31
Nextion.cpp
31
Nextion.cpp
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user