Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: net 1-wire lpc1768 crypto clock web fram log
Diff: http-derived/home/http-home-html.c
- Revision:
- 24:e3ed1b52c6e6
- Child:
- 35:bb8a6d1c034c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/http-derived/home/http-home-html.c Thu Jan 17 13:42:54 2019 +0000
@@ -0,0 +1,36 @@
+#include "http.h"
+#include "page.h"
+#include "radiator.h"
+#include "ds18b20.h"
+#include "program.h"
+#include "http-server.h"
+
+void HttpHomeHtml()
+{
+ HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL);
+ PageAddHeader(PageSite, "Home", NULL, "heating.js");
+
+ HttpAddText("<a href='/program' class='hamburger'>\r\n");
+ HttpAddText("<div class='bar' ></div>\r\n");
+ HttpAddText("<div class='space'></div>\r\n");
+ HttpAddText("<div class='bar' ></div>\r\n");
+ HttpAddText("<div class='space'></div>\r\n");
+ HttpAddText("<div class='bar' ></div>\r\n");
+ HttpAddText("</a>\r\n");
+ HttpAddText("<br/>\r\n");
+ HttpAddText("<br/>\r\n");
+
+ HttpAddText("<div id='ajax-date-html'></div>\r\n");
+ HttpAddText("<br/>\r\n");
+
+ PageAddLabelledName("Hall temperature", 10.0, "ajax-hall-html", "°C");
+ HttpAddText("<br/>\r\n");
+
+ PageAddAjaxToggle(10.0, "Mode: Summer|Winter", "ajax-mode-toggle" , "htg-chg-mode" );
+ HttpAddText("<br/>\r\n");
+ PageAddAjaxToggle(10.0, "Radiators: Off|On" , "ajax-radiator-toggle", "htg-chg-output");
+ HttpAddText("<br/>\r\n");
+
+ PageAddEnd();
+}
+