Enhanced DDC Release Notes
Attention: Use Of This Website
By Using This Website, You agree to the following Website Linked Disclaimer
Return To The Enhanced Display Driver Code Page. This link will take you back to the Enhanced Display Driver Code Webpage. The Enhanced Display Driver Code page gives all the directions to installing and running this Enhanced Display Driver Code. It also gives directions to updating the supporting database files.
HMI - The Human Machine Interface
The HMI, The Human Machine Interface, is what this is all about. The Human is you and/or me. We are the ultimate control over the Machine by using it's Interface, mostly. The Machine here is Raspberry Pi OS, Pi-Star, the MMDVMHost, and the Enhanced Display Driver Code. The Interface is the Nextion Display and it's Nextion Display Code.
We have to allow the Raspberry Pi OS to do what it can do best first. Then, the same with Pi-Star, the MMDVMHost, and the Enhanced Display Driver Code. Making most things happen "Up-Stream" of the Nextion Display and the Nextion Display Code, is the reason for this re-coding project.
By attacking it this way, the HotSpot / Repeater that You and I build in the future can then become a more complete, independent, self-contained, quickly responding, and an easy to use all-in-one appliance. By using programming methods outlined above, this will utilize every aspect of the Machine to help make the Interface respond to what the Human expects intelligently.
The EDDC Release Notes
What's Coming In The Next Release
1. EXPANDED CODE: Not only can you erase the "dim" command coming from the MMDVMHost after the page commnad, It can now be added back in just before the "page" command. OK, I get it, this sounds a little stupid, let's explain the reason for this.
The MMDVMHost presently sends the "dim" command some amount of time AFTER the "page" command. This causes a Brighten-Up look of the switched to mode screen. It can get quite noticeable at times depending of the timing of the dim command coming out of the MMDVMHost.
SO, here's where We help out the MMDVMHost some more. We have a Flag that can be set to remove it's late sent "dim" command, after the "page" change command, and the EDDC has a Flag that can be set so it sends it just before the "page" command is sent. The overall effect of this is a bright mode display from the instant it is loaded. And likewise, the transition to the MMDVM Idle screen gets an idle dim value just before it is loaded.
Sounds a little over kill, We know. Yet your eyes notice the little things and you know something is wrong with the display, it's just trying to figure out what it is. This is the difference between something looking professional and something else looking mediocre. We are trying to bring a polished look to Your Nextion Display coded screens just like the example/full featured HMIs We provide here.
2. EXPANDED CODE: Just like the EDDC System messages were removed from the t0, t1, and t2, being placed on t50 and t51, EDDC now produces it's own specially formatted Owner Callsign, Owner DMR ID, Owner Location, RX Frequency, TX Frequency, Disk Free %, and IP Address. The ability to set a Flag to remove the default MMDVMHost messages from the serial stream is provided. Likewise, a bit setting is needed to activate these EDDC messages.
Presently messages created in t60-t79 (Called PARMS) are generated for page MMDVM/0 global variables. They are set to be global on page 0/MMDVM so they can be used on all pages equally. They will be sent from the EDDC in a global format so the EDDC can send them to any active page on the Nextion Display and still be properly placed in their globally assigned variables on the MMDVM/0 page by the Nextion Display code.
All of the EDDC messages are being moved out away from the MMDVMHost messages. There are the following grouping message types;
t50-t59 EDDC program status messages.
t60-t79 are informational messages that are not required to be updated very often.
t80-t99 are messages that are updated frequently.
Presently defined EDDC program messages.
MMDVM.t50.txt="Version" - 7 spaces <- EDDC Version
MMDVM.t51.txt="Status" - 11 spaces <- EDDC Status
Presently defined EDDC operational messages. Since these items don't change that often, they sent only once on each load/reload of page 0/MMDVM.
MMDVM.t60.txt="Owner Callsign" - 11 spaces <- Callsign
MMDVM.t61.txt="Owner DMR ID" - 11 spaces <- DMR ID
MMDVM.t62.txt="Owner Location" - 31 spaces <- Location
MMDVM.t63.txt="IP Address" - 31 spaces <- IP Address
MMDVM.t64.txt="XXX.XXXXXX" - 11 spaces <- RX Frequency
MMDVM.t65.txt="XXX.XXXXXX" - 11 spaces <- TX Frequency
MMDVM.t66.txt=" XX" - 3 spaces <- Disk Free Percentage
Presently defined EDDC regularly changing message values. What is special about these is that they are sent every ~10 seconds as set by the GenerateCPU on the MMDVMHost setting page. They are also sent as often as possible on all other pages.
MMDVM.t80.txt=" XX.XXºC" - 11 spaces <- Temperature Centigrade
MMDVM.t81.txt="XXX.XXºF" - 11 spaces <- Temperature Fahrenheit
MMDVM.t82.txt=" XXX" - 7 spaces <- CPU Frequency in MHz
MMDVM.t83.txt=" X.XX" - 7 spaces <- CPU Load in Percentage
MMDVM.cpuload.val=number <- CPU Load in hundreds of a Percent
3. EXPANDED CODE: The NextionDriver settings on the MMDVMhost settings page have to be editted. All kinds of ON/OFF settings have been turned into Flags so We don't "LITTER" the MMDVMHost settings file with all kinds of variables. This does complicate the ability to understand how to make something work or make it NOT work.
"GenerateCPU" (ADDED) is to activate and set the timing of the sending of the CPU statistics. "SleepWhenInactive" remains to activate and set the screen saver time.
NOW, We've added "HostMsgFlags=" and NextMsgFlags=". HostMsgFlags are for the removing of MMDVMHost messages from the serial data stream. NextMsgFlags are for adding new messages to the serial data stream. These are 4 digit Hexadecimal numbers WITHOUT the "0x".
0000 0000 0000 0000
|| |||\- Bit to remove MMDVM dim (Brightness Settings)
|| ||\-- Bit to remove MMDVM.status.val=number
|| |\--- Bit to remove MMDVM click
|| \---- Bit to remove MMDVM page (Test Mode)
|\------ Bit to remove MMDVM t20 (Temperature)
\------- Bit to remove MMDVM Page 0/MMDVM t3,t4,t5,t30,t31,t32
0000 0000 0000 0000
|| |||\- Bit to Create dim (Brightness Settings)
|| ||\-- Bit to Create modes
|| |\--- Bit to Activate WaitForLan
|\------ Bit to Create CPU Stats Messages
\------- Bit to Create Formatted Parms
MMDVMHost - Expert Settings Page
In the MMDVMHost settings page, the values for the HostMsgFlags and NextMsgFlags are in hexadecimal formats without the "0x".
4. EXPANDED CODE: More "return;" structuring statements have been added to the "basicFunctions()" page areas to improve code speed. More duplicate messages have been eliminated in this release.
5. REMOVED CODE: The #DMRidDelimiter, #DMRidId, #DMRIdCall, #DMRidName, #DMRidX1, #DMRidX2, and #DMRidX3 are removed from the MMDVMHost setup file, please stop the "LITTERING!" HA! Please cleanup your LITTER! HA! The fact that it has a # in front of it means that it's not read by the NDDC, and the EDDC code. The reading part of these variables in the "int readConfig(void)" code in the helpers.c file have been commented out.
These DMRidDelimiter, DMRidId, DMRIdCall, DMRidName, DMRidX1, DMRidX2, and DMRidX3 are already set to defaults in the beginning of the "int main(int argc, char *argv)" in the NextionDriver.c file. There's no reason at this time for these values to be changed anytime soon.
The database functions within the EDDC are already being reevaluated and more efficient USER lookup options for ALL MODES. They are already on the recoding boards here. YES, We have looked at EA5KL's code, EA5KL just morphed the code from the DMR lookups to the other modes. HUMMMmmmm, NOPE, NO, NOT being done that way here. There are better ways to attack this. All of the mode status strings sent by the MMDVMHost need to be properly tested and parsed before passing them to a set of lookup functions.
As the sweat falls from our heads, preserving the brain cells as best We can...
YEAH! We been putting in some overtime here. We are presently working on the HMIs to show how all of this works, no need in just springing all of this new code in a release without a fully functioning example for you to learn from.
YES! We here care that much! We want you to learn from this, We want you to be able to deep dive into one of Our many HMIs to see how all of this works! Realize that these are preliminary release notes, they are still dynamic and not completely set into stone!
Excalibur has yet to be pulled out of the Stone!
210227 - Future Coding, What's Still Coming in this Release: We are ensuring that Our control over the globally sent Nextion Display commands from the MMDVMHost are working properly. This is also the beginning of controlling the MMDVMHost page 0/MMDVM commands. We are presently working on the Nextion Display HMIs to work with these coding changes....
work... Work... WORK!!! Now onto recoding some more things....
February 19th, 2021 Release Notes 210219A
1. EXPANDED CODE: With the fixing of the startup code to initialize the display properly before it sleeps, 120 seconds, there became a quick sleep problem with quick returns to the MMDVM IDLE screen from a mode screen. When the page command changes to a mode screen, there is now code to Reset sleepTimeOut to zero. This allows for a full time to sleep setting every time it comes back to the MMDVM IDLE screen, page 0.
Global Page Switcher Code: This should complete the page switching code for now. It includes the fixing of the code so the display will sleep, like a display screen saver. It also includes proper coding of the "ussp" for remote Nextion Displays. Don't forget, touching the display will wake it up for the remaining duration of timer, meaning, touching the display doesn't reset the timer, it just wakes up the display.
IF the Nextion Display is powered differently, serially remoted with a separate power supply, then the "ussp" will take over on HotSpot / Repeater power-down. When the "SleepWhenInactive" is set, "ussp" is defaulted to at least 3 minutes. This gives that remoted Nextion Display the ability to sleep when the serial data stops after a minimum of 3 minutes.
This was tackled first to extend the life of the Nextion Display Backlight as much as possible. Those of us in the industrial field of programming HMI's knows that the display, the "I"nterface part of the HMI, is usually always the weakest link. The display usually dies from backlight failure first, Human abuse of the touch membrane second, and then overall life expectancy of the device third.
Future Coding, What's Coming Next: We are still dealing with globally sent Nextion Display commands from the MMDVMHost first. This means commands sent to the Nextion Display that are applied to all pages equally, including the underlying Nextion Display control system commands.
Now onto recoding some more things....
February 18th, 2021 Release Notes 210218A
1. EXPANDED CODE: The Original ON7LDS NDDC sent initialization messages on t0, t1, and t2. These messages would be "NextionDriver", "1.XX", and "STOPPED"/"STARTED" respectively. We have stopped this practice in this release of the EDDC. It will be sending "1.XX" version on "MMDVM.t50.txt=" and "STOPPED"/"STARTED" on "MMDVM.t51.txt=" as global variables to the Nextion Display.
Sent Command: MMDVM.t50.txt="Text EDDC Version Number"
Sent Command: MMDVM.t51.txt="Text EDDC Status"
2. EXPANDED CODE: With this release the "msg" return command message becomes a global variable, "MMDVM.msg.txt=", sent to the MMDVM page of the Nextion Display as a global variable.
Sent Command: MMDVM.msg.txt="Return Command Text"
3. EXPANDED CODE: If the screen is set to sleep, there is an initial forced 120 seconds to make sure the first screen full is populated. This isn't a real biggie, it's just giving time so the display gets all of the first sent messages populated. This usually happens when the screen sleep is set to something less than ~60 seconds.
February 11th, 2021 Release Notes 210211A
1. EXPANDED CODE: NextionDriver.c: static void initNextion() - The Nextion Driver initialization commands have been added to in the following ways;
A. "ussp" sleep control setting was expanded due to the fact that "SleepWhenInactive" can be set very low, so the display sleeps after a few seconds. WELL, if "ussp" gets set to the same, the display could of went to sleep during a long winded talker. NOT GOOD, SO, IF "SleepWhenInactive" is not ZERO seconds and less than 180 seconds, "ussp" is defaulted to 180 seconds, or 3 minutes from now on. IF "SleepWhenInactive" is set to 180 seconds of more, "ussp" is equally set to the same value.
.B. We have now begun to access the MMDVMHost's Nextion DIM settings for Brightness and IdleBrightness. It is no longer HARD CODED in the EDDC sources. This allows for further USER control of the screen brightness settings: Configure -> Expert -> MMDVMHost -> Nextion Section -> Brightness and IdleBrightness. Brightness is set for ALL of the mode screens, the IdleBrightness is set for only the MMDVM "IDLE" screen. The setting for these two items is between 10 and 100.
2. EXPANDED CODE: basicFunctions.c: Page Control Code (starting around line 46);
A. An undecodable page change command sent by the MMDVMHost now defaults to page 0.
B. A page change command is sent only once to the Nextion Display, even if multiple of the same page commands are sent.
C. The startup code now ignores page 0 commands until the first alternate page command is sent. This stops the continuous page 0 reload request flickering of the Nextion Display on startups. The Nextion Display always boots itself into page 0, that is, unless it is coded to behave differently by the Nextion Display code, the code writer.
D. IF there is a page update detected, there is now code to update it for the EDDC first. It then tests to see if "changepages" is set to INHIBIT from sending the page command to the Nextion Display. IF INHIBIT is not set, it then passed the page command to the Nextion Display, ONLY one time.
3. Overall Code Direction: This is the beginning of the recoding that stops unnecessary serial commands going to the Nextion Display for no reason, that they are usually duplicate commands in some way. This means the stopping of the Nextion Display having to deal with doing the same commands over and over again with the same results.
Is This Nextion Insanity and/or Madness?
These are usually duplicate commands that come from the MMDVMHost because of how it does it's internal logic, and, they don't need to be added to by the EDDC. Matter of fact, the EDDC should TRAP these extra commands, helping the MMDVMHost out, and seamlessly make the duplicate commands disappear. This reduction of known duplicate serial commands has begun.
The Nextion Display after reading this takes a bow, and says, "THANK YOU! Some one finally gets it!"
February 9th, 2021 Release Notes 210209A
1. ADDED CODE: initNextion() - This simplifies the initialization commands sent to the Nextion Display. It incorporates a second use of the "SleepWhenInactive" value by adding it to the "ussp" command. This helps in those situations where the Nextion Display is powered by a different power supply.
SO, when the serial data stops coming to the Nextion Display because the Raspberry Pi / Pi-Star has powered down, in "ussp" seconds, or as in "SleepWhenInactive" seconds setting, the display will now go to sleep.
2. When shutting down Pi-Star from the Display, there has always been a "GOODBYE" message set by the Nextion Display Driver Code. This could be seend by those who had the Nextion Display powered by a different power supply. We have begun to allow the Nextion Display Driver Code to hang around long enough so it can now bee seen on Our Nextion Display Code.
This is now seen when a "poweroff" or "reboot" command is sent by the Display Buttons. A Raspberry Pi called shutdown or reboot will not show this message. At this time it is set to 1 second, so this happens quickly.
February 5rd, 2021 Release Notes 210205A
1. Cleaned up code for "RemoveDim". Setting this to 1 will have the EDDC remove the dim=n from the serial stream. This dim value message is sent by the MMDVMHost to the Nextion Display through the Nextion Display Driver if installed.
Goto Configure -> Expert -> MMDVMHost -> NextionDriver Section -> Set "RemoveDim" to 1 to stop the MMDVMHost from changing the display's brightness. Zero disables this feature, or allows the MMDVMHost to change the display brightness.
2. Fixed code for "SleepWhenInactive". We can't use "ussp" to make the Nextion Display sleep when the serial port stays very active on page 0/MMDVM. That is without sending a command to stop sending the data, an alternate way of stopping the serial data, not a screen saver command. ANYHOW, We have adjusted this part of the code so that when "SleepWhenInactive" is anything but 0, the display now goes to sleep for a "SleepWhenInactive" setting number of seconds.
ALSO, Remember here, when the Nextion Display is told to sleep this way, all sent commands after that are ignored until it is told to wake up again. This means no display updates will happen in the background while it is asleep. If you set the thup=1 in your Nextion Display Code, a touch of the display screen will wake it up from this sleep!
Goto Configure -> Expert -> MMDVMHost -> NextionDriver Section -> Set "SleepWhenInactive" to a number of seconds you want the screen to fall asleep while it is "IDLING" on page 0/MMDVM. No other active pages will be told to sleep. Zero disables this feature.
3. Fixed code for "ChangePages". (Not ChangePagesModes as it used to be called, We changed the name of it in the code) When it is set to a 1, this inhibits the pass-through sending of the page command to the Nextion Display. This works just like the "RemoveDim" defined above. I'm not a fan of this, yet, We saw the code in there for this and We just fixed it so it would work. I have saw others in the past ask in different forums for this ability, well, there you go, fixed.
"ChangePages" needs to be added to the MMDVMHost "/etc/mmdvmhost" parameters file under the NextionDriver section list of parameters, by adding "ChangePages=1". Once it is added, it can be edited by going to Configure -> Expert -> MMDVMHost -> NextionDriver Section -> Set ChangePages to 1 to inhibit the MMDVMHost from changing the page when a mode change has occurred. A Zero disables this feature.
4. We have started adding code to speed things up in certain places. This will be a long drawn out battle for a while, speed is important to this code, YET, We don't want to cause any problems doing it.
February 3rd, 2021 Release Notes 210203A
1. The Nextion Display Driver Code was copied from ON7LDS GitHub account, version 210122 v1.19 was pulled. A compile of the code was done to ensure no errors were introduced. Then the code in the files were re-formatted so it could be easily read. Another compile happened, confirming no mistakes added to the code.
2. The "ShowModesStatus" handler was replaced by a request from those on the TEAM here that use it. this is still under development, minor changes will happen to it.
3. Other sent codes within the Nextion Display Driver Code that sent different things to the Nextion Display during startup and shutdown have been commented out. They are not needed and are only annoying.
New ShowModesStatus Documentation (BETA)
ATTENTION: IF your Nextion Display Code is presently using the "ShowModesStatus" of the ON7LDS OR EA5KL Nextion Driver, this functionality has been changed in this Enhanced Nextion Driver Code provided here. Instead of sending all those FIXED color code mode changes, this code sends one variable, MMDVM.modes.val=Number.
YOU get to code it for your Nextion Display Code as YOU see fit. This number is a "Bitwise" representation of the active modes. See the code in the "basicFunctions.c" beginning at around line number ~161 for which bit of the MMDVM.modes.val=Number is for which active mode.
Any high bit within the MMDVM.modes.val means an active mode. It is sent in a "GLOBAL" variable format so it can be GLOBALLY used on any PAGE within your Nextion Display Code in the near future. Make this, MMDVM.modes.val number, a GLOBAL number variable in your Nextion Display Code on the "IDLE", page 0/MMDVM for all future development.
Sent Command: MMDVM.modes.val=number
In Your Nextion Display Code while being edited in the Nextion Editor, "if(MMDVM.modes.val&0x00000001)", will test for the first bit of this GLOBAL 4 byte number. If it is high, the code within the brackets after this if statement will be executed. YOU choose what Your Nextion Display Code does next each of the detected active modes. Make your modes do whatever, change text colors, image colors, etc.
When We finalize a final version of this part of the code, We will let you know.