removed GPS form Layout 2

changed status codes and ommitted cmd code
new example display layouts
This commit is contained in:
ON7LDS
2017-12-28 10:01:52 +01:00
parent 4b97e879f3
commit eb787d89d3
10 changed files with 122 additions and 106 deletions

View File

@@ -84,7 +84,7 @@ bool CNextion::open()
m_ipaddress = (char*)info;
sendCommand("bkcmd=0");
sendCommandAction(0,0);
sendCommandAction(0);
setIdle();
@@ -95,7 +95,7 @@ bool CNextion::open()
void CNextion::setIdleInt()
{
sendCommand("page MMDVM");
sendCommandAction(0,1U);
sendCommandAction(1U);
char command[30U];
::sprintf(command, "dim=%u", m_idleBrightness);
@@ -109,14 +109,14 @@ void CNextion::setIdleInt()
::sprintf(command, "t5.txt=\"%u\"", m_dmrid);
sendCommand(command);
}
sendCommandAction(0,17U);
sendCommandAction(17U);
sendCommand("t1.txt=\"MMDVM IDLE\"");
sendCommandAction(1U,11U);
sendCommandAction(11U);
::sprintf(command, "t3.txt=\"%s\"", m_ipaddress.c_str());
sendCommand(command);
sendCommandAction(3U,16U);
sendCommandAction(16U);
m_clockDisplayTimer.start();
@@ -128,18 +128,18 @@ void CNextion::setErrorInt(const char* text)
assert(text != NULL);
sendCommand("page MMDVM");
sendCommandAction(0,1U);
sendCommandAction(1U);
char command[20];
::sprintf(command, "dim=%u", m_brightness);
sendCommand(command);
::sprintf(command, "t0.txt=\"%s\"", text);
sendCommandAction(0,13U);
sendCommandAction(13U);
sendCommand(command);
sendCommand("t1.txt=\"ERROR\"");
sendCommandAction(1U,14U);
sendCommandAction(14U);
m_clockDisplayTimer.stop();
@@ -149,14 +149,14 @@ void CNextion::setErrorInt(const char* text)
void CNextion::setLockoutInt()
{
sendCommand("page MMDVM");
sendCommandAction(0,1U);
sendCommandAction(1U);
char command[20];
::sprintf(command, "dim=%u", m_brightness);
sendCommand(command);
sendCommand("t0.txt=\"LOCKOUT\"");
sendCommandAction(0,15U);
sendCommandAction(15U);
m_clockDisplayTimer.stop();
@@ -173,7 +173,7 @@ void CNextion::writeDStarInt(const char* my1, const char* my2, const char* your,
if (m_mode != MODE_DSTAR) {
sendCommand("page DStar");
sendCommandAction(0,2U);
sendCommandAction(2U);
}
char text[30U];
@@ -182,16 +182,16 @@ void CNextion::writeDStarInt(const char* my1, const char* my2, const char* your,
::sprintf(text, "t0.txt=\"%s %.8s/%4.4s\"", type, my1, my2);
sendCommand(text);
sendCommandAction(0,22U);
sendCommandAction(42U);
::sprintf(text, "t1.txt=\"%.8s\"", your);
sendCommand(text);
sendCommandAction(1U,23U);
sendCommandAction(45U);
if (::strcmp(reflector, " ") != 0) {
::sprintf(text, "t2.txt=\"via %.8s\"", reflector);
sendCommand(text);
sendCommandAction(2U,24U);
sendCommandAction(46U);
}
m_clockDisplayTimer.stop();
@@ -209,7 +209,7 @@ void CNextion::writeDStarRSSIInt(unsigned char rssi)
char text[20U];
::sprintf(text, "t3.txt=\"-%udBm\"", rssi);
sendCommand(text);
sendCommandAction(3U,25U);
sendCommandAction(47U);
m_rssiCount1 = 1U;
return;
}
@@ -221,7 +221,7 @@ void CNextion::writeDStarRSSIInt(unsigned char rssi)
char text[20U];
::sprintf(text, "t3.txt=\"-%udBm\"", m_rssiAccum1 / DSTAR_RSSI_COUNT);
sendCommand(text);
sendCommandAction(3U,25U);
sendCommandAction(47U);
m_rssiAccum1 = 0U;
m_rssiCount1 = 1U;
}
@@ -233,7 +233,7 @@ void CNextion::writeDStarBERInt(float ber)
char text[20U];
::sprintf(text, "t4.txt=\"%.1f%%\"", ber);
sendCommand(text);
sendCommandAction(4U,26U);
sendCommandAction(48U);
m_berCount1 = 1U;
return;
}
@@ -245,7 +245,7 @@ void CNextion::writeDStarBERInt(float ber)
char text[20U];
::sprintf(text, "t4.txt=\"%.1f%%\"", m_berAccum1 / float(DSTAR_BER_COUNT));
sendCommand(text);
sendCommandAction(4U,26U);
sendCommandAction(48U);
m_berAccum1 = 0.0F;
m_berCount1 = 1U;
}
@@ -254,7 +254,7 @@ void CNextion::writeDStarBERInt(float ber)
void CNextion::clearDStarInt()
{
sendCommand("t0.txt=\"Listening\"");
sendCommandAction(0,21U);
sendCommandAction(41U);
sendCommand("t1.txt=\"\"");
sendCommand("t2.txt=\"\"");
sendCommand("t3.txt=\"\"");
@@ -267,7 +267,7 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
if (m_mode != MODE_DMR) {
sendCommand("page DMR");
sendCommandAction(0,3U);
sendCommandAction(3U);
if (slotNo == 1U) {
@@ -277,7 +277,7 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
}
sendCommand("t2.txt=\"2 Listening\"");
sendCommandAction(2U,31U);
sendCommandAction(69U);
} else {
if (m_screenLayout == 2U) {
sendCommand("t0.pco=0");
@@ -285,7 +285,7 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
}
sendCommand("t0.txt=\"1 Listening\"");
sendCommandAction(0,31U);
sendCommandAction(61U);
}
}
@@ -302,11 +302,11 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
}
sendCommand(text);
sendCommandAction(0,32U);
sendCommandAction(62U);
::sprintf(text, "t1.txt=\"%s%s\"", group ? "TG" : "", dst.c_str());
sendCommand(text);
sendCommandAction(1U,36U);
sendCommandAction(65U);
} else {
::sprintf(text, "t2.txt=\"2 %s %s\"", type, src.c_str());
@@ -316,11 +316,11 @@ void CNextion::writeDMRInt(unsigned int slotNo, const std::string& src, bool gro
}
sendCommand(text);
sendCommandAction(2U,32U);
sendCommandAction(70U);
::sprintf(text, "t3.txt=\"%s%s\"", group ? "TG" : "", dst.c_str());
sendCommand(text);
sendCommandAction(3U,36U);
sendCommandAction(73U);
}
m_clockDisplayTimer.stop();
@@ -343,7 +343,7 @@ void CNextion::writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi)
char text[20U];
::sprintf(text, "t4.txt=\"-%udBm\"", rssi);
sendCommand(text);
sendCommandAction(4U,37U);
sendCommandAction(66U);
m_rssiCount1 = 1U;
return;
}
@@ -355,7 +355,7 @@ void CNextion::writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi)
char text[20U];
::sprintf(text, "t4.txt=\"-%udBm\"", m_rssiAccum1 / DMR_RSSI_COUNT);
sendCommand(text);
sendCommandAction(4U,37U);
sendCommandAction(66U);
m_rssiAccum1 = 0U;
m_rssiCount1 = 1U;
}
@@ -363,7 +363,7 @@ void CNextion::writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi)
if (m_rssiCount2 == 0U) {
char text[20U];
::sprintf(text, "t5.txt=\"-%udBm\"", rssi);
sendCommandAction(5U,37U);
sendCommandAction(74U);
sendCommand(text);
m_rssiCount2 = 1U;
return;
@@ -376,7 +376,7 @@ void CNextion::writeDMRRSSIInt(unsigned int slotNo, unsigned char rssi)
char text[20U];
::sprintf(text, "t5.txt=\"-%udBm\"", m_rssiAccum2 / DMR_RSSI_COUNT);
sendCommand(text);
sendCommandAction(5U,37U);
sendCommandAction(74U);
m_rssiAccum2 = 0U;
m_rssiCount2 = 1U;
}
@@ -391,10 +391,10 @@ void CNextion::writeDMRTAInt(unsigned int slotNo, unsigned char* talkerAlias, co
if (type[0] == ' ') {
if (slotNo == 1U) {
if (m_screenLayout == 2U) sendCommand("t0.pco=33808");
sendCommandAction(0,34U);
sendCommandAction(64U);
} else {
if (m_screenLayout == 2U) sendCommand("t2.pco=33808");
sendCommandAction(2,34U);
sendCommandAction(72U);
}
return;
}
@@ -414,7 +414,7 @@ void CNextion::writeDMRTAInt(unsigned int slotNo, unsigned char* talkerAlias, co
sendCommand("t0.pco=1024");
}
sendCommand(text);
sendCommandAction(0,33U);
sendCommandAction(63U);
} else {
char text[40U];
::sprintf(text, "t2.txt=\"2 %s %s\"", type, talkerAlias);
@@ -430,7 +430,7 @@ void CNextion::writeDMRTAInt(unsigned int slotNo, unsigned char* talkerAlias, co
sendCommand("t2.pco=1024");
}
sendCommand(text);
sendCommandAction(2U,33U);
sendCommandAction(71U);
}
}
@@ -438,7 +438,7 @@ void CNextion::writeDMRGPSInt(unsigned int slotNo, float latitude, float longitu
{
char Lat,Lon,text[40];
if (m_screenLayout < 2U)
if (m_screenLayout < 3U)
return;
if (latitude<0) {
@@ -460,7 +460,7 @@ void CNextion::writeDMRGPSInt(unsigned int slotNo, float latitude, float longitu
int minutesLon = (int)((longitude - (float)degreeLon) * 60.0);
float secondsLon = (float)((longitude - (float)degreeLon - (float)minutesLon / 60.0) * 60.0 * 60.0);
::sprintf(text, "t%d.txt=\"%d%c%d'%.2f\\\" %c %d%c%d'%.2f\\\" %c\"",2*slotNo+7,degreeLat,176U,minutesLat,secondsLat,Lat,degreeLon,176U,minutesLon,secondsLon,Lon);
::sprintf(text, "t%d.txt=\"%d%c%d'%.2f\\\" %c %d%c%d'%.2f\\\" %c\"",2U*slotNo+7U,degreeLat,176U,minutesLat,secondsLat,Lat,degreeLon,176U,minutesLon,secondsLon,Lon);
if (slotNo == 1U) {
sendCommand(text);
@@ -470,7 +470,7 @@ void CNextion::writeDMRGPSInt(unsigned int slotNo, float latitude, float longitu
::sprintf(text, "t12.txt=\"%d\"", positionError);
sendCommand(text);
sendCommandAction(8U,35U);
sendCommandAction(76U);
}
if (slotNo == 2U) {
sendCommand(text);
@@ -480,7 +480,7 @@ void CNextion::writeDMRGPSInt(unsigned int slotNo, float latitude, float longitu
::sprintf(text, "t13.txt=\"%d\"", positionError);
sendCommand(text);
sendCommandAction(10U,35U);
sendCommandAction(77U);
}
}
@@ -491,7 +491,7 @@ void CNextion::writeDMRBERInt(unsigned int slotNo, float ber)
char text[20U];
::sprintf(text, "t6.txt=\"%.1f%%\"", ber);
sendCommand(text);
sendCommandAction(6U,38U);
sendCommandAction(67U);
m_berCount1 = 1U;
return;
}
@@ -503,7 +503,7 @@ void CNextion::writeDMRBERInt(unsigned int slotNo, float ber)
char text[20U];
::sprintf(text, "t6.txt=\"%.1f%%\"", m_berAccum1 / DMR_BER_COUNT);
sendCommand(text);
sendCommandAction(6U,38U);
sendCommandAction(67U);
m_berAccum1 = 0U;
m_berCount1 = 1U;
}
@@ -512,7 +512,7 @@ void CNextion::writeDMRBERInt(unsigned int slotNo, float ber)
char text[20U];
::sprintf(text, "t7.txt=\"%.1f%%\"", ber);
sendCommand(text);
sendCommandAction(7U,38U);
sendCommandAction(75U);
m_berCount2 = 1U;
return;
}
@@ -524,7 +524,7 @@ void CNextion::writeDMRBERInt(unsigned int slotNo, float ber)
char text[20U];
::sprintf(text, "t7.txt=\"%.1f%%\"", m_berAccum2 / DMR_BER_COUNT);
sendCommand(text);
sendCommandAction(7U,38U);
sendCommandAction(75U);
m_berAccum2 = 0U;
m_berCount2 = 1U;
}
@@ -535,7 +535,7 @@ void CNextion::clearDMRInt(unsigned int slotNo)
{
if (slotNo == 1U) {
sendCommand("t0.txt=\"1 Listening\"");
sendCommandAction(0,31U);
sendCommandAction(61U);
if (m_screenLayout == 2U) {
sendCommand("t0.pco=0");
@@ -547,7 +547,7 @@ void CNextion::clearDMRInt(unsigned int slotNo)
sendCommand("t6.txt=\"\"");
} else {
sendCommand("t2.txt=\"2 Listening\"");
sendCommandAction(2U,31U);
sendCommandAction(69U);
if (m_screenLayout == 2U) {
sendCommand("t2.pco=0");
@@ -569,7 +569,7 @@ void CNextion::writeFusionInt(const char* source, const char* dest, const char*
if (m_mode != MODE_YSF) {
sendCommand("page YSF");
sendCommandAction(0,4U);
sendCommandAction(4U);
}
@@ -579,15 +579,15 @@ void CNextion::writeFusionInt(const char* source, const char* dest, const char*
::sprintf(text, "t0.txt=\"%s %.10s\"", type, source);
sendCommand(text);
sendCommandAction(0,42U);
sendCommandAction(82U);
::sprintf(text, "t1.txt=\"%.10s\"", dest);
sendCommand(text);
sendCommandAction(1U,43U);
sendCommandAction(83U);
if (::strcmp(origin, " ") != 0) {
::sprintf(text, "t2.txt=\"at %.10s\"", origin);
sendCommand(text);
sendCommandAction(2U,44U);
sendCommandAction(84U);
}
m_clockDisplayTimer.stop();
@@ -605,7 +605,7 @@ void CNextion::writeFusionRSSIInt(unsigned char rssi)
char text[20U];
::sprintf(text, "t3.txt=\"-%udBm\"", rssi);
sendCommand(text);
sendCommandAction(3U,45U);
sendCommandAction(85U);
m_rssiCount1 = 1U;
return;
}
@@ -617,7 +617,7 @@ void CNextion::writeFusionRSSIInt(unsigned char rssi)
char text[20U];
::sprintf(text, "t3.txt=\"-%udBm\"", m_rssiAccum1 / YSF_RSSI_COUNT);
sendCommand(text);
sendCommandAction(3U,45U);
sendCommandAction(85U);
m_rssiAccum1 = 0U;
m_rssiCount1 = 1U;
}
@@ -629,7 +629,7 @@ void CNextion::writeFusionBERInt(float ber)
char text[20U];
::sprintf(text, "t4.txt=\"%.1f%%\"", ber);
sendCommand(text);
sendCommandAction(4U,46U);
sendCommandAction(86U);
m_berCount1 = 1U;
return;
}
@@ -641,7 +641,7 @@ void CNextion::writeFusionBERInt(float ber)
char text[20U];
::sprintf(text, "t4.txt=\"%.1f%%\"", m_berAccum1 / float(YSF_BER_COUNT));
sendCommand(text);
sendCommandAction(4U,46U);
sendCommandAction(86U);
m_berAccum1 = 0.0F;
m_berCount1 = 1U;
}
@@ -650,7 +650,7 @@ void CNextion::writeFusionBERInt(float ber)
void CNextion::clearFusionInt()
{
sendCommand("t0.txt=\"Listening\"");
sendCommandAction(0,41U);
sendCommandAction(81U);
sendCommand("t1.txt=\"\"");
sendCommand("t2.txt=\"\"");
sendCommand("t3.txt=\"\"");
@@ -664,7 +664,7 @@ void CNextion::writeP25Int(const char* source, bool group, unsigned int dest, co
if (m_mode != MODE_P25) {
sendCommand("page P25");
sendCommandAction(0,5U);
sendCommandAction(5U);
}
char text[30U];
@@ -673,11 +673,11 @@ void CNextion::writeP25Int(const char* source, bool group, unsigned int dest, co
::sprintf(text, "t0.txt=\"%s %.10s\"", type, source);
sendCommand(text);
sendCommandAction(0,52U);
sendCommandAction(102U);
::sprintf(text, "t1.txt=\"%s%u\"", group ? "TG" : "", dest);
sendCommand(text);
sendCommandAction(1U,53U);
sendCommandAction(103U);
m_clockDisplayTimer.stop();
@@ -694,7 +694,7 @@ void CNextion::writeP25RSSIInt(unsigned char rssi)
char text[20U];
::sprintf(text, "t2.txt=\"-%udBm\"", rssi);
sendCommand(text);
sendCommandAction(2U,54U);
sendCommandAction(104U);
m_rssiCount1 = 1U;
return;
}
@@ -706,7 +706,7 @@ void CNextion::writeP25RSSIInt(unsigned char rssi)
char text[20U];
::sprintf(text, "t2.txt=\"-%udBm\"", m_rssiAccum1 / P25_RSSI_COUNT);
sendCommand(text);
sendCommandAction(2U,54U);
sendCommandAction(104U);
m_rssiAccum1 = 0U;
m_rssiCount1 = 1U;
}
@@ -718,7 +718,7 @@ void CNextion::writeP25BERInt(float ber)
char text[20U];
::sprintf(text, "t3.txt=\"%.1f%%\"", ber);
sendCommand(text);
sendCommandAction(3U,55U);
sendCommandAction(105U);
m_berCount1 = 1U;
return;
}
@@ -730,7 +730,7 @@ void CNextion::writeP25BERInt(float ber)
char text[20U];
::sprintf(text, "t3.txt=\"%.1f%%\"", m_berAccum1 / float(P25_BER_COUNT));
sendCommand(text);
sendCommandAction(3U,55U);
sendCommandAction(105U);
m_berAccum1 = 0.0F;
m_berCount1 = 1U;
}
@@ -739,7 +739,7 @@ void CNextion::writeP25BERInt(float ber)
void CNextion::clearP25Int()
{
sendCommand("t0.txt=\"Listening\"");
sendCommandAction(0,51U);
sendCommandAction(101U);
sendCommand("t1.txt=\"\"");
sendCommand("t2.txt=\"\"");
sendCommand("t3.txt=\"\"");
@@ -748,7 +748,7 @@ void CNextion::clearP25Int()
void CNextion::writeCWInt()
{
sendCommand("t1.txt=\"Sending CW Ident\"");
sendCommandAction(1U,12U);
sendCommandAction(12U);
m_clockDisplayTimer.start();
m_mode = MODE_CW;
@@ -757,7 +757,7 @@ void CNextion::writeCWInt()
void CNextion::clearCWInt()
{
sendCommand("t1.txt=\"MMDVM IDLE\"");
sendCommandAction(1U,11U);
sendCommandAction(11U);
}
void CNextion::clockInt(unsigned int ms)
@@ -786,21 +786,18 @@ void CNextion::clockInt(unsigned int ms)
void CNextion::close()
{
sendCommand("page MMDVM");
sendCommandAction(0,1U);
sendCommandAction(1U);
sendCommand("t1.txt=\"MMDVM STOPPED\"");
sendCommandAction(1U,19U);
sendCommandAction(19U);
m_serial->close();
delete m_serial;
}
void CNextion::sendCommandAction(unsigned int field, unsigned int status)
void CNextion::sendCommandAction(unsigned int status)
{
if (m_screenLayout<3U) return;
char text[30U];
::sprintf(text, "MMDVM.cmd.val=%d", field);
sendCommand(text);
::sprintf(text, "MMDVM.status.val=%d", status);
sendCommand(text);
sendCommand("click S0,1");

View File

@@ -91,7 +91,7 @@ private:
unsigned int m_berCount2;
void sendCommand(const char* command);
void sendCommandAction(unsigned int field, unsigned int status);
void sendCommandAction(unsigned int status);
};
#endif

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -35,14 +35,10 @@ Another option is to set the command above in the Preinitialization Event
DIY layouts
-----------
When selecting this layout, all processing can and should be done in the
Nextion display itsself.
Nextion display itself.
Whenever MMDVMHost sends new data to the screen, it also sends information
about wat was sent:
* global variable MMDVM.cmd will hold the number of the changed field
(not the object id! 0 for t0, 1 for t1, etc.)
* global variable MMDVM.status will hold the status of the change
(the type of information sent - see further in this document)
about what was sent as a number in global variable MMDVM.status.
(see further in this document for a table of numbers and their events)
Then MMDVMHost activates the Touch Press Event of object 'S0' of the
active page.
@@ -53,18 +49,32 @@ HMI file. As a straightforward example, the code there will show you how
to do some tasks when receiving data from MMDVMHost or NextionDriver:
- change colors and fonts of the TA on the DMR page when it arrives.
(TA length calculation is done in the display itsself !)
- remove the slot number from t2.txt (since it's always 2)
- display the GPS data (if received) in a new field (called 'GPS'),
by copying the GPS data form the field where MMDVMHost has
written to (t11 for GPS data from slot 2 in DMS format)
- remove the slot number from t2.txt (since it's always 2)
The examples are there to give you an idea of what can be done.
It is up to your imagination to go even further.
When, for example, you want to change the text 'listening' to some
other text, like 'RX', you just have to monitor the event status and
take action in the Touch Event of S0 of the corresponding page.
Or you could hide/show pictures, switch to other pages, etc.
Check the NextionDriver program and the display layouts there to see
some other examples of what can be done by programming in the
display. (https://github.com/on7lds/NextionDriver)
NOTE: it might be good to not remove fields from the display when you do not
NOTE: it might be good to *not* remove fields from the display when you do not
need them, but make them small (i.e. 10 x 10 pixels) and put them aside:
Give them the same font color and background color as where you put them
OR
Put them behind some picture: put them on top of the picture, then select the
picture and click the 'Bring Top' button to put it on top of all those fields
OR
set them invisible when the page is selected (with the 'vis' command) in the
preinitialize event of the page
This way, you can use the data from the fields to process them
as is done with the GPS data in the example.
@@ -92,34 +102,42 @@ changed field.
17 : ID/Call (t0 and t4,t5 are sent)
19 : END
21 : D-Star listening
22 : type/my1/my2
23 : your
24 : reflector
25 : RSSI
26 : ber
41 : D-Star listening
42 : type/my1/my2
45 : your
46 : reflector
47 : RSSI
48 : ber
31 : DMR listening
32 : ID
33 : TA
34 : Call end
35 : GPS (t8,t9,t12 or t10,t11,t13 are sent)
36 : TG
37 : RSSI
38 : ber
61 : DMR listening1
62 : ID1
63 : TA1
64 : Call end1
65 : TG1
66 : RSSI1
67 : ber1
69 : DMR listening2
70 : ID2
71 : TA2
72 : Call end2
73 : TG2
74 : RSSI2
75 : ber2
76 : GPS1 (t8,t9,t12)
77 : GPS2 (t10,t11,t13)
41 : YSF listening
42 : src
43 : dest
44 : origin
45 : RSSI
46 : ber
81 : YSF listening
82 : src
83 : dest
84 : origin
85 : RSSI
86 : ber
51 : P25 listening
52 : source
53 : dest
54 : RSSI
55 : ber
101 : P25 listening
102 : source
103 : dest
104 : RSSI
105 : ber
@@ -155,7 +173,7 @@ t5 : rssi2
t6 : ber1
t7 : ber2
screenLayout >1 :
screenLayout >2 :
t8 : GPS1 dec
t9 : GPS1 DMS
t10: GPS2 dec

View File

@@ -21,5 +21,6 @@ More information about the layouts can be found in
When you want extra control over what has to be sent to the Nextion display,
you could consider the program 'NextionDriver' at https://github.com/on7lds/NextionDriver as a companion to MMDVMHost (it also makes it possible to use buttons on the display).
you could consider the program 'NextionDriver' at https://github.com/on7lds/NextionDriver as a companion to MMDVMHost.
This program sends extra information about the host to the display and can do processing which would not be the task of MMDVMHost (for example: with the help of this program, it is possible to use buttons on the display).
In verbose mode, this program shows you all communication between MMDVMHost and the display.