Skip to content

Commit

Permalink
Changes of Nextion related files to reflect the addition of NXDN
Browse files Browse the repository at this point in the history
  • Loading branch information
on7lds committed Mar 18, 2018
1 parent 29248a9 commit 9ee9b4f
Show file tree
Hide file tree
Showing 18 changed files with 35 additions and 22 deletions.
12 changes: 6 additions & 6 deletions Nextion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(5U);
sendCommandAction(6U);
}

char text[30U];
Expand All @@ -625,11 +625,11 @@ void CNextion::writeNXDNInt(const char* source, bool group, unsigned int dest, c

::sprintf(text, "t0.txt=\"%s %.10s\"", type, source);
sendCommand(text);
sendCommandAction(102U);
sendCommandAction(122U);

::sprintf(text, "t1.txt=\"%s%u\"", group ? "TG" : "", dest);
sendCommand(text);
sendCommandAction(103U);
sendCommandAction(123U);

m_clockDisplayTimer.stop();

Expand All @@ -649,7 +649,7 @@ void CNextion::writeNXDNRSSIInt(unsigned char rssi)
char text[25U];
::sprintf(text, "t2.txt=\"-%udBm\"", m_rssiAccum1 / NXDN_RSSI_COUNT);
sendCommand(text);
sendCommandAction(104U);
sendCommandAction(124U);
m_rssiAccum1 = 0U;
m_rssiCount1 = 0U;
}
Expand All @@ -664,7 +664,7 @@ void CNextion::writeNXDNBERInt(float ber)
char text[25U];
::sprintf(text, "t3.txt=\"%.1f%%\"", m_berAccum1 / float(NXDN_BER_COUNT));
sendCommand(text);
sendCommandAction(105U);
sendCommandAction(125U);
m_berAccum1 = 0.0F;
m_berCount1 = 0U;
}
Expand All @@ -673,7 +673,7 @@ void CNextion::writeNXDNBERInt(float ber)
void CNextion::clearNXDNInt()
{
sendCommand("t0.txt=\"Listening\"");
sendCommandAction(101U);
sendCommandAction(121U);
sendCommand("t1.txt=\"\"");
sendCommand("t2.txt=\"\"");
sendCommand("t3.txt=\"\"");
Expand Down
Binary file modified Nextion_ON7LDS/NX3224T024-L2.HMI
Binary file not shown.
Binary file modified Nextion_ON7LDS/NX3224T024-L2.tft
Binary file not shown.
Binary file modified Nextion_ON7LDS/NX3224T024-L3.HMI
Binary file not shown.
Binary file modified Nextion_ON7LDS/NX3224T024-L3.tft
Binary file not shown.
Binary file modified Nextion_ON7LDS/NX3224T028-L2.HMI
Binary file not shown.
Binary file modified Nextion_ON7LDS/NX3224T028-L2.tft
Binary file not shown.
Binary file modified Nextion_ON7LDS/NX3224T028-L3.HMI
Binary file not shown.
Binary file modified Nextion_ON7LDS/NX3224T028-L3.tft
Binary file not shown.
Binary file modified Nextion_ON7LDS/NX4024T032-L2.HMI
Binary file not shown.
Binary file modified Nextion_ON7LDS/NX4024T032-L2.tft
Binary file not shown.
Binary file modified Nextion_ON7LDS/NX4832T035-L2.HMI
Binary file not shown.
Binary file modified Nextion_ON7LDS/NX4832T035-L2.tft
Binary file not shown.
Binary file modified Nextion_ON7LDS/NX4832T035-L3.HMI
Binary file not shown.
Binary file modified Nextion_ON7LDS/NX4832T035-L3.tft
Binary file not shown.
6 changes: 3 additions & 3 deletions Nextion_ON7LDS/README-L2
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ There are some other changes:
to automatically change the font size, is activated.
0 = auto (future use, for now it's G4KLX layout)
1 = G4KLX layout
2 = ON7LDS layout (this README file)
3 = DIY by ON7LDS layout (see README-L3)
4 = DIY by ON7LDS layout Hig Speed (see README-L3)
2 = ON7LDS layout (this README file)
3 = ON7LDS DIY layout (see README-L3)
4 = ON7LDS DIY layout High Speed (see README-L3)
29 changes: 21 additions & 8 deletions Nextion_ON7LDS/README-L3
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Nextion Display Layouts by ON7LDS (for MMDVMHost)
# #
# screenLayout 3 & 4 files (-L3) #
# #
# DIY layouts #
# ON7LDS DIY layouts #
# #
####################################

Expand All @@ -14,11 +14,11 @@ MMDVM.ini file under the Nextion section. This way, the extra functions
are activated.
0 = auto (future use, for now it's G4KLX layout)
1 = G4KLX layout
2 = ON7LDS layout (see README-L2)
3 = ON7LDS DIY layout (this README file)
4 = ON7LDS DIY layout Hig Speed (this README file)
2 = ON7LDS layout (see README-L2)
3 = ON7LDS DIY layout (this README file)
4 = ON7LDS DIY layout High Speed (this README file)

screenLayout 3 and 4 are the same, but selecting 3, MMDVMHost wil communicate
screenLayout 3 and 4 are the same, but selecting 3, MMDVMHost will communicate
at 9600bps with the display and selecting 4 will set the baudrate to 115200.
If you select 4 (115200bps) *you* have to program your Nextion to default to
that baudrate.
Expand All @@ -32,8 +32,8 @@ Another option is to set the command above in the Preinitialization Event
because 'on rare occasions bauds has become lost'


DIY layouts
-----------
ON7LDS DIY layouts
------------------
When selecting this layout, all processing can and should be done in the
Nextion display itself.
Whenever MMDVMHost sends new data to the screen, it also sends information
Expand All @@ -48,7 +48,7 @@ Check the Touch Press Event of object 'S0' of the DMR page of the example
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 !)
(TA length calculation is done in the display itself !)
- remove the slot number from t2.txt (since it's always 2)
- in the middle of the DMR screen, the previous user is displayed
for each slot (S1 at the left, S2 at the right)
Expand Down Expand Up @@ -93,6 +93,7 @@ changed field.
3 : page DMR
4 : page YSF
5 : page P25
6 : page NXDN

11 : IDLE
12 : CW
Expand Down Expand Up @@ -140,6 +141,12 @@ changed field.
104 : RSSI
105 : ber

121 : NXDN listening
122 : source
123 : dest
124 : RSSI
125 : ber



Fields (and their numbers) on the pages, used by MMDVMHost
Expand Down Expand Up @@ -198,3 +205,9 @@ t2 : rssi
t3 : ber


NXDN
t0 : type,source
t1 : dst
t2 : rssi
t3 : ber

10 changes: 5 additions & 5 deletions Nextion_ON7LDS/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
Nextion Display Layouts by ON7LDS (for MMDVMHost)
=================================================

The screenlayout has to be selected with the parameter ScreenLayout in the
The screenlayout has to be selected with the parameter **ScreenLayout** in the
MMDVM.ini file under the Nextion section. This way, the extra functions
are activated.

0 = auto (future use, for now it's G4KLX layout)
1 = G4KLX layout
2 = ON7LDS layout (see README-L2)
3 = DIY layout
4 = DIY layout High Speed
3 = ON7LDS DIY layout
4 = ON7LDS DIY layout High Speed

Layout 2 is a no-nonsense layout. It is the original (G4KLX) layout with the Talker Alias added. TA color and fonts size can not be changed. At least not easily.

Layout 3 (as is 4) is a layout without any predefined layout options (color, fonts). It sends the fields *and* information about what was sent to the display, so all layout processing can and should be done in the display itself.
Layout 3 (as is 4) is a layout without any predefined layout options (color, fonts). It sends the fields **and** information about what was sent to the display, so all layout processing can and should be done in the display itself.

More information about the layouts can be found in
* README-L2 for the screenLayout 2 setting
* README-L2 for the screenLayout 3 and 4 settings


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.
This program sends extra information about the host to the display, can do callsign lookup with extended information (name, city, country) and can do more 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).
This program sends extra information about the host to the display, can do callsign lookup with extended information (name, city, country) and can do more 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 to do actions on the host itself).
In verbose mode, this program shows you all communication between MMDVMHost and the display.

0 comments on commit 9ee9b4f

Please sign in to comment.