MQX 4.0.1 web_hvac demo - modifying web pages

Discussion created by lmg on Jul 25, 2013

This is a fun project with lots of different pieces to play with.


One thing you can do is modify the content of the web pages.




You will find html web pages in the web_pages folder. You can modify these with your favorite editor (like notepad).


>>>  NOTE! Make a copy of the entire web_hvac demo folder before you make changes. You will need it later. <<<


Then you click on the batch file mktfs.bat. This converts the files in the web_pages folder to the tiny file system (tfs) format used by MQX in this application. Note that the relative location of this batch file, the web_pages folder, etc are are hard-coded in this batch file. So I expect that if you move stuff around, you will have problems.


Output is the file tfs_data.c, which is placed in the Sources folder for the project. You can look at this file and see just huge arrays of hex data. At the end of the file is something that looks like a directory of all the files included.




One thing you will notice once you make your changes, rebuild and reflash your project is that your modified web pages don't display the same way the original ones did. There seems to be some formatting missing.


There is.


The original tfs_data.c file has two extra files in it that you don't get when you run the batch file. One is a cascading style sheet (mqx.css) and other is a java script (request.js). But not to worry. You can manually add these. From the original tfs_data.c file (you did make a copy, right?) find the section for mqx.css.



Copy and paste the whole thing into your new tfs_data.c file.


Do the same for the request.js section.


Then find the two lines in the directory that go with these sections and paste them into your tfs_data.c file.






I put the two files at the end of the array and I put the directory entries at the end also. I do not know if the order makes a difference or not.


Hope this helps!