From 756f5010a900b85d5a64c0e67463f53a172630c8 Mon Sep 17 00:00:00 2001 From: phl0 Date: Thu, 15 Sep 2016 10:44:21 +0200 Subject: [PATCH] Add display of CW Ident to Nextion display --- Nextion.cpp | 14 ++++++++++++++ Nextion.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/Nextion.cpp b/Nextion.cpp index 7fdc72d..0cd97cb 100644 --- a/Nextion.cpp +++ b/Nextion.cpp @@ -233,6 +233,20 @@ void CNextion::clearFusionInt() sendCommand("t2.txt=\"\""); } +void CNextion::sendCWInt() +{ + sendCommand("page MMDVM"); + + char command[30]; + ::sprintf(command, "dim=%u", m_brightness); + sendCommand(command); + + ::sprintf(command, "t0.txt=\"%-6s / %u\"", m_callsign.c_str(), m_dmrid); + + sendCommand(command); + sendCommand("t1.txt=\"Sending CW Ident\""); +} + void CNextion::clockInt(unsigned int ms) { // Update the clock display in IDLE mode every 400ms diff --git a/Nextion.h b/Nextion.h index 38fa55f..112d974 100644 --- a/Nextion.h +++ b/Nextion.h @@ -50,6 +50,8 @@ protected: virtual void writeFusionInt(const char* source, const char* dest, const char* type, const char* origin); virtual void clearFusionInt(); + virtual void sendCWInt(); + virtual void clockInt(unsigned int ms); private: