2017-12-05 19:50:56 +00:00
|
|
|
Nextion Display Layouts by ON7LDS (for MMDVMHost)
|
|
|
|
=================================================
|
|
|
|
|
|
|
|
####################################
|
|
|
|
# #
|
|
|
|
# screenLayout 3 & 4 files (-L3) #
|
|
|
|
# #
|
2018-03-18 15:32:27 +00:00
|
|
|
# ON7LDS DIY layouts #
|
2017-12-05 19:50:56 +00:00
|
|
|
# #
|
|
|
|
####################################
|
|
|
|
|
|
|
|
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
|
2018-03-18 15:32:27 +00:00
|
|
|
2 = ON7LDS layout (see README-L2)
|
2018-07-28 08:57:35 +00:00
|
|
|
3 = ON7LDS DIY layout (this README file)
|
|
|
|
4 = ON7LDS DIY layout High Speed (this README file)
|
2017-12-05 19:50:56 +00:00
|
|
|
|
2018-03-18 15:32:27 +00:00
|
|
|
screenLayout 3 and 4 are the same, but selecting 3, MMDVMHost will communicate
|
2017-12-05 19:50:56 +00:00
|
|
|
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.
|
|
|
|
|
2017-12-10 20:50:47 +00:00
|
|
|
How to set the default Nextion Display baudrate ?
|
|
|
|
You could use the Nextion editor, connect to your display with the debug
|
|
|
|
tool (do not forget to select your display and not the simulator) and
|
|
|
|
give the command 'bauds=115200'.
|
|
|
|
Another option is to set the command above in the Preinitialization Event
|
|
|
|
of the first page. Nextion recommends to do the latter in any case,
|
|
|
|
because 'on rare occasions bauds has become lost'
|
|
|
|
|
2017-12-05 19:50:56 +00:00
|
|
|
|
2018-03-18 15:32:27 +00:00
|
|
|
ON7LDS DIY layouts
|
|
|
|
------------------
|
2017-12-05 19:50:56 +00:00
|
|
|
When selecting this layout, all processing can and should be done in the
|
2017-12-28 09:01:52 +00:00
|
|
|
Nextion display itself.
|
2017-12-05 19:50:56 +00:00
|
|
|
Whenever MMDVMHost sends new data to the screen, it also sends information
|
2017-12-28 09:01:52 +00:00
|
|
|
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)
|
2017-12-05 19:50:56 +00:00
|
|
|
|
|
|
|
Then MMDVMHost activates the Touch Press Event of object 'S0' of the
|
|
|
|
active page.
|
|
|
|
In this event procedure, all processing can be done.
|
|
|
|
|
|
|
|
Check the Touch Press Event of object 'S0' of the DMR page of the example
|
2017-12-17 18:09:28 +00:00
|
|
|
HMI file. As a straightforward example, the code there will show you how
|
|
|
|
to do some tasks when receiving data from MMDVMHost or NextionDriver:
|
2017-12-10 20:50:47 +00:00
|
|
|
- change colors and fonts of the TA on the DMR page when it arrives.
|
2018-03-18 15:32:27 +00:00
|
|
|
(TA length calculation is done in the display itself !)
|
2017-12-28 09:01:52 +00:00
|
|
|
- remove the slot number from t2.txt (since it's always 2)
|
2017-12-31 18:20:20 +00:00
|
|
|
- in the middle of the DMR screen, the previous user is displayed
|
|
|
|
for each slot (S1 at the left, S2 at the right)
|
|
|
|
This is done by copying the data from the ID/TA field to these
|
|
|
|
fields at call end.
|
2017-12-10 20:50:47 +00:00
|
|
|
|
2017-12-28 09:01:52 +00:00
|
|
|
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)
|
2017-12-05 19:50:56 +00:00
|
|
|
|
2017-12-28 09:01:52 +00:00
|
|
|
|
|
|
|
NOTE: it might be good to *not* remove fields from the display when you do not
|
2017-12-17 18:09:28 +00:00
|
|
|
need them, but make them small (i.e. 10 x 10 pixels) and put them aside:
|
2018-07-28 08:57:35 +00:00
|
|
|
Give them the same font colour and background colour as where you put them
|
2017-12-17 18:09:28 +00:00
|
|
|
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
|
2017-12-28 09:01:52 +00:00
|
|
|
OR
|
|
|
|
set them invisible when the page is selected (with the 'vis' command) in the
|
|
|
|
preinitialize event of the page
|
2017-12-17 18:09:28 +00:00
|
|
|
|
|
|
|
This way, you can use the data from the fields to process them
|
|
|
|
as is done with the GPS data in the example.
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-05 19:50:56 +00:00
|
|
|
|
|
|
|
Status codes that will be sent:
|
|
|
|
-------------------------------
|
|
|
|
The status code gives more information about what was sent in the
|
|
|
|
changed field.
|
|
|
|
|
2017-12-10 20:50:47 +00:00
|
|
|
1 : page MMDVM
|
|
|
|
2 : page D-Star
|
|
|
|
3 : page DMR
|
|
|
|
4 : page YSF
|
|
|
|
5 : page P25
|
2018-03-18 15:32:27 +00:00
|
|
|
6 : page NXDN
|
2018-07-28 08:57:35 +00:00
|
|
|
7 : page POCSAG
|
2017-12-10 20:50:47 +00:00
|
|
|
|
|
|
|
11 : IDLE
|
|
|
|
12 : CW
|
|
|
|
13 : ERROR text
|
|
|
|
14 : ERROR
|
|
|
|
15 : LOCKOUT
|
|
|
|
16 : IPaddress
|
2017-12-19 20:02:51 +00:00
|
|
|
17 : ID/Call (t0 and t4,t5 are sent)
|
2017-12-10 20:50:47 +00:00
|
|
|
19 : END
|
2018-09-05 20:12:12 +00:00
|
|
|
20 : RX Frequency
|
|
|
|
21 : TX Frequency
|
|
|
|
22 : Temperature
|
|
|
|
23 : Location
|
2017-12-10 20:50:47 +00:00
|
|
|
|
2017-12-28 09:01:52 +00:00
|
|
|
41 : D-Star listening
|
|
|
|
42 : type/my1/my2
|
|
|
|
45 : your
|
|
|
|
46 : reflector
|
|
|
|
47 : RSSI
|
|
|
|
48 : 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)
|
|
|
|
|
|
|
|
81 : YSF listening
|
|
|
|
82 : src
|
|
|
|
83 : dest
|
|
|
|
84 : origin
|
|
|
|
85 : RSSI
|
|
|
|
86 : ber
|
|
|
|
|
|
|
|
101 : P25 listening
|
|
|
|
102 : source
|
|
|
|
103 : dest
|
|
|
|
104 : RSSI
|
|
|
|
105 : ber
|
2017-12-10 20:50:47 +00:00
|
|
|
|
2018-03-18 15:32:27 +00:00
|
|
|
121 : NXDN listening
|
|
|
|
122 : source
|
|
|
|
123 : dest
|
|
|
|
124 : RSSI
|
|
|
|
125 : ber
|
|
|
|
|
2018-07-28 08:57:35 +00:00
|
|
|
132 : RIC
|
|
|
|
133 : message text
|
|
|
|
134 : waiting
|
2017-12-10 20:50:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
Fields (and their numbers) on the pages, used by MMDVMHost
|
|
|
|
----------------------------------------------------------
|
2017-12-05 19:50:56 +00:00
|
|
|
|
|
|
|
MMDVM
|
2017-12-10 20:50:47 +00:00
|
|
|
t0 : owner call & ID / errortext LOCKOUT
|
2018-07-28 08:57:35 +00:00
|
|
|
t1 : status / ERROR
|
2017-12-05 19:50:56 +00:00
|
|
|
t2 : date & time
|
2017-12-10 20:50:47 +00:00
|
|
|
|
2018-09-05 20:12:12 +00:00
|
|
|
|
|
|
|
screenLayout >2 :
|
2017-12-05 19:50:56 +00:00
|
|
|
t3 : ip address
|
2017-12-17 18:09:28 +00:00
|
|
|
t4 : owner call
|
|
|
|
t5 : owner ID
|
2018-09-05 20:12:12 +00:00
|
|
|
t20 : CPU Temperature in C. ( Can be changed to F in mmdmvhost config setting: [NEXTION] Section, Setting=DisplayTempInFahrenheit=1)
|
|
|
|
t30 : RX Frequency
|
|
|
|
t31 : Location
|
|
|
|
t32 : TX Frequency
|
2017-12-05 19:50:56 +00:00
|
|
|
|
2017-12-10 20:50:47 +00:00
|
|
|
|
2017-12-05 19:50:56 +00:00
|
|
|
D-Star
|
|
|
|
t0 : type my1 my2
|
|
|
|
t1 : your
|
|
|
|
t2 : reflector
|
|
|
|
t3 : rssi
|
|
|
|
t4 : ber
|
|
|
|
|
2017-12-10 20:50:47 +00:00
|
|
|
|
2017-12-05 19:50:56 +00:00
|
|
|
DMR
|
|
|
|
t0 : src1 id / call / TA
|
|
|
|
t1 : dst
|
|
|
|
t2 : src2 id / call / TA
|
|
|
|
t3 : dst
|
|
|
|
t4 : rssi1
|
|
|
|
t5 : rssi2
|
|
|
|
t6 : ber1
|
|
|
|
t7 : ber2
|
|
|
|
|
2017-12-28 09:01:52 +00:00
|
|
|
screenLayout >2 :
|
2017-12-10 20:50:47 +00:00
|
|
|
t8 : GPS1 dec
|
|
|
|
t9 : GPS1 DMS
|
|
|
|
t10: GPS2 dec
|
|
|
|
t11: GPS2 DMS
|
|
|
|
t12: GPS1 err
|
|
|
|
t13: GPS2 err
|
|
|
|
|
|
|
|
|
2017-12-05 19:50:56 +00:00
|
|
|
YSF
|
|
|
|
t0 : type,source
|
|
|
|
t1 : dst
|
|
|
|
t2 : src
|
|
|
|
t3 : rssi
|
|
|
|
t4 : ber
|
|
|
|
|
2017-12-10 20:50:47 +00:00
|
|
|
|
2017-12-05 19:50:56 +00:00
|
|
|
P25
|
|
|
|
t0 : type,source
|
|
|
|
t1 : dst
|
|
|
|
t2 : rssi
|
|
|
|
t3 : ber
|
|
|
|
|
|
|
|
|
2018-03-18 15:32:27 +00:00
|
|
|
NXDN
|
|
|
|
t0 : type,source
|
|
|
|
t1 : dst
|
|
|
|
t2 : rssi
|
|
|
|
t3 : ber
|
|
|
|
|
2018-07-28 08:57:35 +00:00
|
|
|
POCSAG
|
|
|
|
t0 : waiting / RIC
|
|
|
|
t1 : message
|