diff --git a/Nextion.cpp b/Nextion.cpp index c5c43d4..f4a3f63 100644 --- a/Nextion.cpp +++ b/Nextion.cpp @@ -344,6 +344,8 @@ void CNextion::writeDMRTAInt(unsigned int slotNo, unsigned char* talkerAlias, c { char text[40U]; + if (m_screenLayout<2U) return; + if (type[0]==' ') { if (slotNo == 1U) { sendCommand("t0.pco=33808"); @@ -421,8 +423,8 @@ void CNextion::clearDMRInt(unsigned int slotNo) { if (slotNo == 1U) { sendCommand("t0.txt=\"1 Listening\""); - sendCommand("t0.pco=0"); if (m_screenLayout==2U) { + sendCommand("t0.pco=0"); sendCommand("t0.font=4"); } sendCommand("t1.txt=\"\""); @@ -430,8 +432,8 @@ void CNextion::clearDMRInt(unsigned int slotNo) sendCommand("t6.txt=\"\""); } else { sendCommand("t2.txt=\"2 Listening\""); - sendCommand("t2.pco=0"); if (m_screenLayout==2U) { + sendCommand("t2.pco=0"); sendCommand("t2.font=4"); } sendCommand("t3.txt=\"\""); diff --git a/Nextion_ON7LDS/README b/Nextion_ON7LDS/README new file mode 100644 index 0000000..25542b9 --- /dev/null +++ b/Nextion_ON7LDS/README @@ -0,0 +1,29 @@ +The files in this directory are Nextion screen layouts with better fonts than + the(rather ugly) standard Nextion fonts + +There are some other changes: + +* On the main screen there is a field to display the active ip address of the + device. On Linux it is preceded with the network interface name. +* DMR: if received, the Talker Alias is decoded and displayed. The TA will be + in green, so the user knows it is a decoded TA displaying. + This happens on-the-fly: as the parts of the TA arrive, they will immediately + be shown. +* If you want to change my screen layout, the only thing to keep in mind is + that the MMDVMHost program will select following font numbers: + default font for the TA field : font 4 + TA >16 characters : font 3 + TA >20 characters : font 2 + TA >24 characters : font 1 + There always have to be at least 5 fonts, of which font 1-4 are used for the + TA. If your display is wide enough to show all characters in one font, you + must copy this font to the lesser ('smaller') fonts. + i.e. : the 3.2" the display can show more than 31 characters (the maximum + TA length) in font 2, so this font is also copied to font 1. +* The screenlayout has to be selected with the parameter ScreenLayout in the + MMDVM.ini file under the Nextion section. This way, the extra function + to automatically change the font size, is activated. + 0 = auto (future use, for now it's G4KLX layout) + 1 = G4KLX layout + 2 = ON7LDS layout +