A GPS disciplined clock

Dependencies:   net lpc1768 crypto clock web log

Revision:
59:d2d25c2265f8
Parent:
58:3f3e000151cc
Child:
60:7cab896b0fd4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web-this/home/web-home-html.c	Wed May 01 10:14:26 2019 +0000
@@ -0,0 +1,42 @@
+
+#include "http.h"
+#include "web-add.h"
+#include "web-nav-this.h"
+
+void WebHomeHtml()
+{
+    HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL);
+    WebAddHeader("Home", "settings.css", "home.js");
+    WebAddNav(HOME_PAGE);
+    WebAddH1("Home");
+    
+    WebAddH2("Status");
+    WebAddAjaxLed("RTC is set"           , "ajax-rtc-set"    );
+    WebAddAjaxLed("Clock is set"         , "ajax-clock-set"  );
+    WebAddAjaxLed("PPS is stable"        , "ajax-pps-stable" );
+    WebAddAjaxLed("Rate synchronised"    , "ajax-rate-locked");
+    WebAddAjaxLed("Time synchronised"    , "ajax-time-locked");
+    WebAddAjaxLed("NMEA is stable"       , "ajax-nmea-stable");
+
+    WebAddH2("Server UTC time");
+    HttpAddText("<div id='date-utc'></div>\r\n");
+
+    WebAddH2("Server local time");
+    HttpAddText("<div id='date-pc'></div>\r\n");
+    
+    WebAddH2("Server - PC (ms)");
+    HttpAddText("<div id='date-diff'></div>\r\n");    
+    
+    WebAddH2("UTC");
+    WebAddAjaxInputToggle("Enable epoch change"      ,    "ajax-leap-enable"  , "chg-clock-leap-enable" );
+    WebAddAjaxInputToggle("Direction of next epoch"  ,    "ajax-leap-forward" , "chg-clock-leap-forward");
+    WebAddAjaxInput      ("Year next epoch starts"   , 5, "ajax-leap-year"    , "set-clock-leap-year"   );
+    WebAddAjaxInput      ("Month next epoch starts"  , 5, "ajax-leap-month"   , "set-clock-leap-month"  );
+    WebAddAjaxInput      ("Current era offset"       , 5, "ajax-leap-count"   , "set-clock-leap-count"  );
+
+    HttpAddText("<div><button type='button' onclick='DisplayLeap()'>Display Leap</button></div>\r\n");
+    
+    HttpAddText("<div>The leap seconds list is available from <a href='https://www.ietf.org/timezones/data/leap-seconds.list' target='_blank'>ietf</a></div>\r\n");
+
+    WebAddEnd();
+}