Hi,
I'm not sure if I got the subject of the topic right but here is what I want to do: After applying "Fixes for Microchip MDD Demo TCPIP Stack 5.31" I managed to compile the MDD Demo with C30 v3.21. I successfully enabled AN0 and I was able to show the reading on the web page through the existing HTTPPrint_pot() function from CustomHTTPApp.c. Now I would like to read a second channel AN1, and also send it to the webpage.
I believe these are the steps to do it:
1.create a new function in CustomHTTPApp.c for example HTTPPrint_pot1()
2.call that function in the StackApplications() so it runs in the loop once every tick (1 sec?)
3.edit status.xml to add the new variable for parsing
4.edit index.html to print the new variable
I am able to do steps 1,3,4 but I cannot find the place where I need to call my newly created function from.
Is it supposed to be called inside StackApplications() ? If so where is that defined ? because I couldn't find it..
Thanks,
Florin
Hi,
You don't need to add it into StackApplications()! Just Add it into CustomHTTPApp.c and status.xml.
This way if you put ~pot1~ into your website it will call your HTTPPrint_pot1() in CustomHTTPApp.c.
I have several new functions included in my project and this works just fine!
thanks, I figured it out eventually. The trick is to add it to CustomHTTApp.c and then when you run the MPFS2 utility to generate your HTTPPrint.h file it will automatically add a case for calling the custom function.
Thanks anyway!