A GPS disciplined clock
Dependencies: net lpc1768 crypto clock web log
web-this/home/web-home-html.c@75:0ed9157d3bb3, 2019-10-10 (annotated)
- Committer:
- andrewboyson
- Date:
- Thu Oct 10 19:09:48 2019 +0000
- Revision:
- 75:0ed9157d3bb3
- Parent:
- 61:d4bacff13381
- Child:
- 87:5052e316994a
Updated libraries
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 27:eb5728b9052b | 1 | |
andrewboyson | 55:a1bd0572c8b6 | 2 | #include "http.h" |
andrewboyson | 57:2d54e570de60 | 3 | #include "web-add.h" |
andrewboyson | 59:d2d25c2265f8 | 4 | #include "web-nav-this.h" |
andrewboyson | 27:eb5728b9052b | 5 | |
andrewboyson | 55:a1bd0572c8b6 | 6 | void WebHomeHtml() |
andrewboyson | 27:eb5728b9052b | 7 | { |
andrewboyson | 27:eb5728b9052b | 8 | HttpOk("text/html; charset=UTF-8", "no-cache", NULL, NULL); |
andrewboyson | 57:2d54e570de60 | 9 | WebAddHeader("Home", "settings.css", "home.js"); |
andrewboyson | 57:2d54e570de60 | 10 | WebAddNav(HOME_PAGE); |
andrewboyson | 57:2d54e570de60 | 11 | WebAddH1("Home"); |
andrewboyson | 27:eb5728b9052b | 12 | |
andrewboyson | 57:2d54e570de60 | 13 | WebAddH2("Status"); |
andrewboyson | 57:2d54e570de60 | 14 | WebAddAjaxLed("RTC is set" , "ajax-rtc-set" ); |
andrewboyson | 57:2d54e570de60 | 15 | WebAddAjaxLed("Clock is set" , "ajax-clock-set" ); |
andrewboyson | 57:2d54e570de60 | 16 | WebAddAjaxLed("PPS is stable" , "ajax-pps-stable" ); |
andrewboyson | 57:2d54e570de60 | 17 | WebAddAjaxLed("Rate synchronised" , "ajax-rate-locked"); |
andrewboyson | 57:2d54e570de60 | 18 | WebAddAjaxLed("Time synchronised" , "ajax-time-locked"); |
andrewboyson | 57:2d54e570de60 | 19 | WebAddAjaxLed("NMEA is stable" , "ajax-nmea-stable"); |
andrewboyson | 27:eb5728b9052b | 20 | |
andrewboyson | 57:2d54e570de60 | 21 | WebAddH2("Server UTC time"); |
andrewboyson | 61:d4bacff13381 | 22 | HttpAddText("<div id='ajax-date-utc'></div>\r\n"); |
andrewboyson | 27:eb5728b9052b | 23 | |
andrewboyson | 57:2d54e570de60 | 24 | WebAddH2("Server local time"); |
andrewboyson | 61:d4bacff13381 | 25 | HttpAddText("<div id='ajax-date-pc'></div>\r\n"); |
andrewboyson | 27:eb5728b9052b | 26 | |
andrewboyson | 57:2d54e570de60 | 27 | WebAddH2("Server - PC (ms)"); |
andrewboyson | 61:d4bacff13381 | 28 | HttpAddText("<div id='ajax-date-diff'></div>\r\n"); |
andrewboyson | 27:eb5728b9052b | 29 | |
andrewboyson | 57:2d54e570de60 | 30 | WebAddH2("UTC"); |
andrewboyson | 57:2d54e570de60 | 31 | WebAddAjaxInputToggle("Enable epoch change" , "ajax-leap-enable" , "chg-clock-leap-enable" ); |
andrewboyson | 57:2d54e570de60 | 32 | WebAddAjaxInputToggle("Direction of next epoch" , "ajax-leap-forward" , "chg-clock-leap-forward"); |
andrewboyson | 57:2d54e570de60 | 33 | WebAddAjaxInput ("Year next epoch starts" , 5, "ajax-leap-year" , "set-clock-leap-year" ); |
andrewboyson | 57:2d54e570de60 | 34 | WebAddAjaxInput ("Month next epoch starts" , 5, "ajax-leap-month" , "set-clock-leap-month" ); |
andrewboyson | 57:2d54e570de60 | 35 | WebAddAjaxInput ("Current era offset" , 5, "ajax-leap-count" , "set-clock-leap-count" ); |
andrewboyson | 27:eb5728b9052b | 36 | |
andrewboyson | 60:7cab896b0fd4 | 37 | HttpAddText("<div><button type='button' onclick='displayLeap()'>Display Leap</button></div>\r\n"); |
andrewboyson | 27:eb5728b9052b | 38 | |
andrewboyson | 60:7cab896b0fd4 | 39 | HttpAddText("<div>The leap seconds list is available <a href='https://www.ietf.org/timezones/data/leap-seconds.list' target='_blank'>here</a></div>\r\n"); |
andrewboyson | 27:eb5728b9052b | 40 | |
andrewboyson | 57:2d54e570de60 | 41 | WebAddEnd(); |
andrewboyson | 27:eb5728b9052b | 42 | } |