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 lpc1768 crypto clock web log
web-this/home/web-home-html.c@59:d2d25c2265f8, 2019-05-01 (annotated)
- Committer:
- andrewboyson
- Date:
- Wed May 01 10:14:26 2019 +0000
- Revision:
- 59:d2d25c2265f8
- Parent:
- web-derived/home/web-home-html.c@58:3f3e000151cc
- Child:
- 60:7cab896b0fd4
Updated web library
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 | 27:eb5728b9052b | 22 | HttpAddText("<div id='date-utc'></div>\r\n"); |
andrewboyson | 27:eb5728b9052b | 23 | |
andrewboyson | 57:2d54e570de60 | 24 | WebAddH2("Server local time"); |
andrewboyson | 27:eb5728b9052b | 25 | HttpAddText("<div id='date-pc'></div>\r\n"); |
andrewboyson | 27:eb5728b9052b | 26 | |
andrewboyson | 57:2d54e570de60 | 27 | WebAddH2("Server - PC (ms)"); |
andrewboyson | 27:eb5728b9052b | 28 | HttpAddText("<div id='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 | 27:eb5728b9052b | 37 | HttpAddText("<div><button type='button' onclick='DisplayLeap()'>Display Leap</button></div>\r\n"); |
andrewboyson | 27:eb5728b9052b | 38 | |
andrewboyson | 27:eb5728b9052b | 39 | 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"); |
andrewboyson | 27:eb5728b9052b | 40 | |
andrewboyson | 57:2d54e570de60 | 41 | WebAddEnd(); |
andrewboyson | 27:eb5728b9052b | 42 | } |