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.
Dependents: oldheating gps motorhome heating
Diff: clock/http-clock-html.c
- Revision:
- 58:e5ab14ef6ea6
- Parent:
- 56:f6e814fe0159
- Child:
- 59:309e78f243dd
--- a/clock/http-clock-html.c Thu Mar 07 13:40:12 2019 +0000
+++ b/clock/http-clock-html.c Fri Mar 08 16:07:56 2019 +0000
@@ -18,11 +18,11 @@
PageAddH1(PageSite, "Clock");
PageAddH2("Status");
- PageAddAjaxToggle(10.0, "RTC is set" , "ajax-rtc-set" , "");
- PageAddAjaxToggle(10.0, "Clock is set" , "ajax-clock-set" , "");
- PageAddAjaxToggle(10.0, "External source is ok", "ajax-source-ok" , "");
- PageAddAjaxToggle(10.0, "Rate synchronised" , "ajax-rate-locked", "");
- PageAddAjaxToggle(10.0, "Time synchronised" , "ajax-time-locked", "");
+ PageAddAjaxLed(10.0, "RTC is set" , "ajax-rtc-set" );
+ PageAddAjaxLed(10.0, "Clock is set" , "ajax-clock-set" );
+ PageAddAjaxLed(10.0, "External source is ok", "ajax-source-ok" );
+ PageAddAjaxLed(10.0, "Rate synchronised" , "ajax-rate-locked");
+ PageAddAjaxLed(10.0, "Time synchronised" , "ajax-time-locked");
PageAddH2("Server UTC time");
HttpAddText("<div id='date-utc'></div>\r\n");
@@ -34,32 +34,32 @@
HttpAddText("<div id='date-diff'></div>\r\n");
PageAddH2("UTC");
- PageAddAjaxToggle(16.0, "Enable epoch change" , "ajax-leap-enable" , "chg-clock-leap-enable" );
- PageAddAjaxToggle(16.0, "Direction of next epoch" , "ajax-leap-forward" , "chg-clock-leap-forward");
- PageAddAjaxInput (12.0, "Year next epoch starts" , 5.2 , "ajax-leap-year" , "set-clock-leap-year" );
- PageAddAjaxInput (12.0, "Month next epoch starts" , 5.2 , "ajax-leap-month" , "set-clock-leap-month" );
- PageAddAjaxInput (12.0, "Current era offset" , 5.2 , "ajax-leap-count" , "set-clock-leap-count" );
+ PageAddAjaxInputToggle(16, "Enable epoch change" , "ajax-leap-enable" , "chg-clock-leap-enable" );
+ PageAddAjaxInputToggle(16, "Direction of next epoch" , "ajax-leap-forward" , "chg-clock-leap-forward");
+ PageAddAjaxInput (12, "Year next epoch starts" , 5.2 , "ajax-leap-year" , "set-clock-leap-year" );
+ PageAddAjaxInput (12, "Month next epoch starts" , 5.2 , "ajax-leap-month" , "set-clock-leap-month" );
+ PageAddAjaxInput (12, "Current era offset" , 5.2 , "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");
PageAddH2("Governer");
- PageAddIntInput ("/clock", 0, "Ppb", 12, "ppb", 5, ClkGovGetPpb() );
- PageAddIntInput ("/clock", 0, "Ppb divisor", 12, "ppbdivisor", 5, ClkGovFreqDivisor );
- PageAddIntInput ("/clock", 0, "Ppb max change", 12, "ppbmaxchange", 5, ClkGovFreqChangeMaxPpb );
- PageAddIntInput ("/clock", 0, "Ppb synced limit", 12, "syncedlimitppb", 5, ClkGovFreqSyncedLimPpb );
- PageAddIntInput ("/clock", 0, "Ppb synced hysteresis", 12, "syncedhysppb", 5, ClkGovFreqSyncedHysPpb );
+ PageAddInputInt (12, "Ppb", 5, ClkGovGetPpb() , "/clock", "ppb" );
+ PageAddInputInt (12, "Ppb divisor", 5, ClkGovFreqDivisor , "/clock", "ppbdivisor" );
+ PageAddInputInt (12, "Ppb max change", 5, ClkGovFreqChangeMaxPpb , "/clock", "ppbmaxchange" );
+ PageAddInputInt (12, "Ppb synced limit", 5, ClkGovFreqSyncedLimPpb , "/clock", "syncedlimitppb");
+ PageAddInputInt (12, "Ppb synced hysteresis", 5, ClkGovFreqSyncedHysPpb , "/clock", "syncedhysppb" );
- PageAddIntInput ("/clock", 0, "Offset divisor", 12, "slewdivisor", 5, ClkGovSlewDivisor );
- PageAddIntInput ("/clock", 0, "Offset max (ms)", 12, "slewmax", 5, ClkGovSlewChangeMaxMs );
- PageAddIntInput ("/clock", 0, "Offset synced limit (ms)",12, "syncedlimitns", 5, ClkGovSlewSyncedLimNs / 1000000 );
- PageAddIntInput ("/clock", 0, "Offset synced hys (ms)", 12, "syncedhysns", 5, ClkGovSlewSyncedHysNs / 1000000 );
- PageAddIntInput ("/clock", 0, "Offset reset limit (s)", 12, "maxoffsetsecs", 5, ClkGovSlewOffsetMaxSecs );
+ PageAddInputInt (12, "Offset divisor", 5, ClkGovSlewDivisor , "/clock", "slewdivisor" );
+ PageAddInputInt (12, "Offset max (ms)", 5, ClkGovSlewChangeMaxMs , "/clock", "slewmax" );
+ PageAddInputInt (12, "Offset synced limit (ms)", 5, ClkGovSlewSyncedLimNs / 1000000 , "/clock", "syncedlimitns" );
+ PageAddInputInt (12, "Offset synced hys (ms)", 5, ClkGovSlewSyncedHysNs / 1000000 , "/clock", "syncedhysns" );
+ PageAddInputInt (12, "Offset reset limit (s)", 5, ClkGovSlewOffsetMaxSecs , "/clock", "maxoffsetsecs" );
PageAddH2("Trace");
- if (ClkGovTrace) PageAddCheckInput("/clock", "Trace gov is on" , 10, "clockgovtrace", "turn off");
- else PageAddCheckInput("/clock", "Trace gov is off", 10, "clockgovtrace", "turn on" );
+ if (ClkGovTrace) PageAddInputButton(10, "Trace gov is on", "turn off", "/clock", "clockgovtrace");
+ else PageAddInputButton(10, "Trace gov is off", "turn on" , "/clock", "clockgovtrace");
PageAddH2("Scan times");
PageAddLabelledInt("Program cycles avg", 17, ScanAverage);