Enhanced Display Driver Code

The Enhanced Display Driver Code

Attention: Use Of This Website

By Using This Website, You agree to the following Website Linked Disclaimer 

Did You Install The ON7LDS NDDC First?

ATTENTION: This is to say that YOU have already installed the ON7LDS Nextion Display Driver Code FIRST and it is WORKING properly, as expected. The procedures below do not install all the other ON7LDS Nextion Display Driver support files at this time.



As We Dig Into The ON7LDS NDD Code

This will take time. We wish to first not break anything that it already does. This means that as We dig into this ON7LDS NDD Code, it will be slow going. Releases may have to wait so that We can thoroughly inspect our changes and make sure that it ONLY enhances what it used to do. We hope that you understand Our way of thinking, and, that We don't want you using anything partially coded, half baked.

Installing The Enhanced Display Driver Code Below

This code is meant to compile and respond similarly to the ON7LDS Nextion Display Driver. It's what has been done under the hood is what usually matters. This means that your compiled Nextion Display Code flashed to your Nextion Display should know of any changes documented in the EDDC Release NOTES webpage link below.
We are presently NOT using GitHub for this project to keep it under Special Control / Scrutiny as it is documented, rewritten, and expanded. Even so, progress releases will still be freely given away here. We do have a GitHub account for a mature code release in the future and then that will allow for better automated integration into other installers.

This Is Your Final WARNING Before YOU Proceed

WE assume from this point on that YOU are advanced enough to understand what is going on when you take the following actions below. This is your final WARNING that you are about to make your Pi-Star -> MMDVMHost -> Display Driver Code -> Nextion Display(Nextion Display Code) installation switch to using this Enhanced Display Driver Code.

This Enhanced Display Driver Code

Hello! Welcome to the Documenting, Editing, and Expanding project for this Enhanced Display Driver Code. This so We can make it do more than it has ever done before. You will have to have the latest version of ON7LDS Nextion Display Driver already installed and working. This is a FULL RELEASE of this code, version 210218A as documented within all of the file headers.
 The EDDC Release Notes
 The EDDC Release Notes Link. These Release Notes are for those who are writing their own Nextion Display Code and are looking to use the extra functionality of this Enhanced Display Driver Code. This version supplied here will compile and has been tested to work as documented within these Release Notes. ENJOY!

Installing And Updating The Database Files

This section will help you install the supporting database files. This latest "Enhanced Display Driver Code" is presently 100% compatible with the Nextion Display Code Files located on this website. This may change in the future, and, We will let you know when a Nextion Display Code upgrade is mandatory to include the newer functionality of this Enhanced Display Driver Code.
MAKE SURE: That after every command executed below that the command prompt remains in "(rw)" mode. IF it should change back to "(ro)" after executing a command, do another "rpi-rw" to get it back to "(rw)" mode first.
COMMAND COPY AND PASTE: You can copy and paste these commands into the Pi-Star SSH window. With your mouse, highlight the "BOLD BLACK COLORED" command below. Press CRTL-C. Go to your Pi-Star SSH Window. Click on the flashing cursor to make sure you are "IN" the SSH window.
With the mouse, right click in the flashing SSH cursor. When the menu pops-up, click on "Paste from browser". Click inside of the "ENTRY BOX" and press CRTL-V to paste your copied command from this webpage into the dialog box. Press the OK button. The command should be pasted onto the SSH window command line. Press enter. DONE! Command executed!
... From A Freshly Started Pi-Star SSH window ...
pi-star login: pi-star <ENTER KEY>
Password: raspberry <ENTER KEY>
pi-star@pi-star(ro):~$ rpi-rw <ENTER KEY>
pi-star@pi-star(rw):~$ mkdir code <ENTER KEY>
pi-star@pi-star(rw):~$ cd code <ENTER KEY>
Executing these commands above will initialize the DDC coding directory.
pi-star@pi-star(rw):code$ sudo su <ENTER KEY>
root@pi-star(rw):code$ pwd <ENTER KEY>
root@pi-star(rw):code$ ls -al <ENTER KEY>
1. Executing the "ls -al" command above will give a directory listing.
2. If you have done this first part before,
3. And "getScripts.sh" is in this directory list shown,
4. Then do a "rm getScripts.sh" to remove it.
5. Then carefully remove any duplicate files shown ending in .1, .2, etc.,
6. By the command "rm Filename.1, .2, etc." next.
7. This helps cleans up the coding directory for a fresh start.
8. Then continue with the next command below.
root@pi-star(rw):code$ wget http://ag4oj.com/DDC/Code/getScripts.sh <ENTER KEY>
root@pi-star(rw):code$ chmod u+x getScripts.sh <ENTER KEY>
root@pi-star(rw):code$ ./getScripts.sh <ENTER KEY>
The "./getScripts.sh" when executed will download/update all the required scripts for this webpage, making them executable, including refreshing the "getScripts.sh" file just executed.
root@pi-star(rw):code$ ./databases.sh <ENTER KEY>
Executing the "./databases.sh" will download the new database files, remove the old ones, and update them, the "stripped.csv", "groups.txt", "TGIF_groups.txt", and "DMR+_groups.txt" files on the Pi-Star image. These database files are "MOVED" into their proper places. The "databases.sh" script file will be left behind for future database updates at your leisure.
The "groups.txt", "TGIF_groups.txt", and "DMR+_groups.txt" files are for different DMR Networks. They allow for displaying the proper Talk Group Names, setting this is done on the Pi-Star Configure -> Expert -> MMDVMHost -> NextionDriver section setting of the GroupsFile. Click "Apply Changes" and then REBOOT Pi-Star for the replacement database file to take effect.

Downloading The Enhanced Display Driver Code Files

This section will help you download the Enhanced Display Driver Code files in preparation to compile it.
... From A Freshly Started Pi-Star SSH window ...
pi-star login: pi-star <ENTER KEY>
Password: raspberry <ENTER KEY>
pi-star@pi-star(ro):~$ rpi-rw <ENTER KEY>
pi-star@pi-star(rw):~$ cd code <ENTER KEY>
pi-star@pi-star(rw):code$ sudo su <ENTER KEY>
root@pi-star(rw):code$ pwd <ENTER KEY>
root@pi-star(rw):code$ ./getIt.sh <ENTER KEY>
Executing these commands above will download the Enhanced Display Driver code files to the "/home/pi-star/code" directory. The "getIt.sh" Script file and the Enhanced Display Driver Code files will remain in the "code" directory afterwards. The executing the "getIt.sh" script in the future makes sure that you have downloaded the latest version of the code.

Compiling The Enhanced Display Driver Code Files

This section will help you Compile the Enhanced Display Driver Code.
root@pi-star(rw):code$ make <ENTER KEY>
After running the "make" command, you should NOT see any errors. If you do, something went wrong, STOP right HERE! Retrace your steps. when all else fails, contact me, DO NOTHING FURTHER!

Installing The Enhanced Display Driver Code Files

This section will help you install the Enhanced Display Driver Code.
root@pi-star(rw):code$ ls -al NextionDriver <ENTER KEY>
-rwxw-xr-x 1 root root 53684 Feb 7 17:25 NextionDriver
OK, make compiled just file, NO ERRORS WERE REPORTED. Doing this next command above makes sure that We have a compiled executable. IF this command above gives you a file listing for the NextionDriver, as shown, continue to the next commands below.
root@pi-star(rw):code$ rm /usr/local/bin/NextionDriver <ENTER KEY>
root@pi-star(rw):code$ cp NextionDriver /usr/local/bin/NextionDriver <ENTER KEY>
root@pi-star(rw):code$ ls -al /usr/local/bin/NextionDriver <ENTER KEY>
-rwxw-xr-x 1 root bin 53684 Feb 7 17:25 /usr/local/bin/NextionDriver
The next command above removes the active NextionDriver executable from the Pi-Star image. The next command after that moves a copy of the newly compiled NextionDriver into place. Then the last command above give a directory listing of the properly placed newly compiled NextionDriver version.
The output of file listing above and this last one should match file sizes and dates of compile. Remember here, the file sizes should match, yet, depending on the build version, they both could be a different size then shown. The date will obviously be the date when you compiled the Nextion Driver Code. This is just an example of what you'll see.
The "moveIt.sh" script was also downloaded by the "./getScripts.sh" and does all 4 of the above commands. If you feel comfortable with the procedures above, the "./moveIt.sh" will save some time. The "./moveIt.sh" script still shows the file sizes and dates so there can still be a visual comparison of the files on the screen.
root@pi-star(rw):code$ reboot <ENTER KEY>
Rebooting will allow the new database files and the Enhanced Display Driver to take effect, ENJOY! You'll see what the Enhanced Display Driver looks like on Our Nextion Display Code provided on this website, CLICK HERE. 

When All Else Fails

OK, WHEN ALL ELSE FAILS: This installation of this newly Enhanced Display Driver Code Executable can be easily over-written by doing a full install of the ON7LDS Nextion Driver using the ON7LDS default installers through GitHub. We have a Guide on this website to install the default ON7LDS Nextion Driver, CLICK HERE. 

Want To HELP?

My contact info is below. Look, I can't always give you %100 of my attention on every single problem. Want to help with the changes, testing, have something to added, or something doesn't work right? Contact me below.

Downloading The individual Files

This section allows for downloading individual files from the "Code" directory on this website. Copy and paste the commands below into the program you use to download them. Edit them as you see fit. The "groups.txt" file is On-The-Fly generated, so there is no repository on AG4OJ.com for that database file.
wget http://ag4oj.com/NDC/Databases/stripped.csv
wget http://ag4oj.com/NDC/Databases/TGIF_groups.txt
wget http://ag4oj.com/NDC/Databases/DMR+_groups.txt
wget http://ag4oj.com/DDC/Code/getScripts.sh
wget http://ag4oj.com/DDC/Code/databases.sh
wget http://ag4oj.com/DDC/Code/getIt.sh
wget http://ag4oj.com/DDC/Code/moveIt.sh
wget http://ag4oj.com/DDC/Code/Makefile
wget http://ag4oj.com/DDC/Code/basicFunctions.c
wget http://ag4oj.com/DDC/Code/basicFunctions.h
wget http://ag4oj.com/DDC/Code/helpers.c
wget http://ag4oj.com/DDC/Code/helpers.h
wget http://ag4oj.com/DDC/Code/NextionDriver.c
wget http://ag4oj.com/DDC/Code/NextionDriver.h
wget http://ag4oj.com/DDC/Code/processButtons.c
wget http://ag4oj.com/DDC/Code/processButtons.h
wget http://ag4oj.com/DDC/Code/processCommands.c
wget http://ag4oj.com/DDC/Code/processCommands.h