mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 15:09:23 +08:00
Add callsign and DMR id to displays idle screen
This commit is contained in:
10
Nextion.cpp
10
Nextion.cpp
@@ -23,7 +23,9 @@
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
|
||||
CNextion::CNextion(const std::string& port, unsigned int brightness) :
|
||||
CNextion::CNextion(const char* callsign, unsigned int dmrid, const std::string& port, unsigned int brightness) :
|
||||
m_callsign(callsign),
|
||||
m_dmrid(dmrid),
|
||||
m_serial(port, SERIAL_9600),
|
||||
m_brightness(brightness)
|
||||
{
|
||||
@@ -57,7 +59,11 @@ void CNextion::setIdle()
|
||||
{
|
||||
sendCommand("page MMDVM");
|
||||
|
||||
sendCommand("t0.txt=\"IDLE\"");
|
||||
char command[30];
|
||||
::sprintf(command, "t0.txt=\"%-6s / %u\"", m_callsign, m_dmrid);
|
||||
|
||||
sendCommand(command);
|
||||
sendCommand("t1.txt=\"MMDVM IDLE\"");
|
||||
}
|
||||
|
||||
void CNextion::setError(const char* text)
|
||||
|
||||
Reference in New Issue
Block a user