mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-22 16:25:45 +08:00
Add POCSAG processing and display code.
This commit is contained in:
32
Nextion.cpp
32
Nextion.cpp
@@ -616,7 +616,7 @@ void CNextion::writeNXDNInt(const char* source, bool group, unsigned int dest, c
|
||||
|
||||
if (m_mode != MODE_NXDN) {
|
||||
sendCommand("page NXDN");
|
||||
sendCommandAction(6U);
|
||||
sendCommandAction(7U);
|
||||
}
|
||||
|
||||
char text[30U];
|
||||
@@ -679,6 +679,36 @@ void CNextion::clearNXDNInt()
|
||||
sendCommand("t3.txt=\"\"");
|
||||
}
|
||||
|
||||
void CNextion::writePOCSAGInt(uint32_t ric, const std::string& message)
|
||||
{
|
||||
if (m_mode != MODE_POCSAG) {
|
||||
sendCommand("page POCSAG");
|
||||
sendCommandAction(6U);
|
||||
}
|
||||
|
||||
char text[30U];
|
||||
::sprintf(text, "dim=%u", m_brightness);
|
||||
sendCommand(text);
|
||||
|
||||
::sprintf(text, "t0.txt=\"RIC: %u\"", ric);
|
||||
sendCommand(text);
|
||||
sendCommandAction(132U);
|
||||
|
||||
::sprintf(text, "t1.txt=\"MSG: %s\"", message.c_str());
|
||||
sendCommand(text);
|
||||
sendCommandAction(133U);
|
||||
|
||||
m_clockDisplayTimer.stop();
|
||||
|
||||
m_mode = MODE_POCSAG;
|
||||
}
|
||||
|
||||
void CNextion::clearPOCSAGInt()
|
||||
{
|
||||
sendCommand("t1.txt=\"MMDVM IDLE\"");
|
||||
sendCommandAction(134U);
|
||||
}
|
||||
|
||||
void CNextion::writeCWInt()
|
||||
{
|
||||
sendCommand("t1.txt=\"Sending CW Ident\"");
|
||||
|
||||
Reference in New Issue
Block a user