Dependencies:   net 1-wire lpc1768 crypto clock web fram log

/media/uploads/andrewboyson/heating.sch

/media/uploads/andrewboyson/heating.brd

/media/uploads/andrewboyson/eagle.epf

Committer:
andrewboyson
Date:
Thu Jan 17 13:42:54 2019 +0000
Revision:
24:e3ed1b52c6e6
Child:
35:bb8a6d1c034c
Updated http-base library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 24:e3ed1b52c6e6 1 #include "http.h"
andrewboyson 24:e3ed1b52c6e6 2 #include "page.h"
andrewboyson 24:e3ed1b52c6e6 3 #include "radiator.h"
andrewboyson 24:e3ed1b52c6e6 4 #include "ds18b20.h"
andrewboyson 24:e3ed1b52c6e6 5 #include "program.h"
andrewboyson 24:e3ed1b52c6e6 6 #include "http-server.h"
andrewboyson 24:e3ed1b52c6e6 7
andrewboyson 24:e3ed1b52c6e6 8 void HttpHomeHtml()
andrewboyson 24:e3ed1b52c6e6 9 {
andrewboyson 24:e3ed1b52c6e6 10 HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL);
andrewboyson 24:e3ed1b52c6e6 11 PageAddHeader(PageSite, "Home", NULL, "heating.js");
andrewboyson 24:e3ed1b52c6e6 12
andrewboyson 24:e3ed1b52c6e6 13 HttpAddText("<a href='/program' class='hamburger'>\r\n");
andrewboyson 24:e3ed1b52c6e6 14 HttpAddText("<div class='bar' ></div>\r\n");
andrewboyson 24:e3ed1b52c6e6 15 HttpAddText("<div class='space'></div>\r\n");
andrewboyson 24:e3ed1b52c6e6 16 HttpAddText("<div class='bar' ></div>\r\n");
andrewboyson 24:e3ed1b52c6e6 17 HttpAddText("<div class='space'></div>\r\n");
andrewboyson 24:e3ed1b52c6e6 18 HttpAddText("<div class='bar' ></div>\r\n");
andrewboyson 24:e3ed1b52c6e6 19 HttpAddText("</a>\r\n");
andrewboyson 24:e3ed1b52c6e6 20 HttpAddText("<br/>\r\n");
andrewboyson 24:e3ed1b52c6e6 21 HttpAddText("<br/>\r\n");
andrewboyson 24:e3ed1b52c6e6 22
andrewboyson 24:e3ed1b52c6e6 23 HttpAddText("<div id='ajax-date-html'></div>\r\n");
andrewboyson 24:e3ed1b52c6e6 24 HttpAddText("<br/>\r\n");
andrewboyson 24:e3ed1b52c6e6 25
andrewboyson 24:e3ed1b52c6e6 26 PageAddLabelledName("Hall temperature", 10.0, "ajax-hall-html", "&deg;C");
andrewboyson 24:e3ed1b52c6e6 27 HttpAddText("<br/>\r\n");
andrewboyson 24:e3ed1b52c6e6 28
andrewboyson 24:e3ed1b52c6e6 29 PageAddAjaxToggle(10.0, "Mode: Summer|Winter", "ajax-mode-toggle" , "htg-chg-mode" );
andrewboyson 24:e3ed1b52c6e6 30 HttpAddText("<br/>\r\n");
andrewboyson 24:e3ed1b52c6e6 31 PageAddAjaxToggle(10.0, "Radiators: Off|On" , "ajax-radiator-toggle", "htg-chg-output");
andrewboyson 24:e3ed1b52c6e6 32 HttpAddText("<br/>\r\n");
andrewboyson 24:e3ed1b52c6e6 33
andrewboyson 24:e3ed1b52c6e6 34 PageAddEnd();
andrewboyson 24:e3ed1b52c6e6 35 }
andrewboyson 24:e3ed1b52c6e6 36