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: http-clock-script.inc
- Revision:
- 22:f45bbb468439
- Parent:
- 21:048b7dbdf0aa
- Child:
- 23:f340b48d0538
diff -r 048b7dbdf0aa -r f45bbb468439 http-clock-script.inc
--- a/http-clock-script.inc Wed Jan 09 12:25:08 2019 +0000
+++ b/http-clock-script.inc Wed Jan 09 18:22:56 2019 +0000
@@ -37,8 +37,8 @@
" msRtc += rtcDate.getTime();\n"
" msDiff = msRtc - Date.now();\n"
" msCountAtRtcSet = msCount;\n"
-" rtcIsSet = hexToBit(4, 0)\n"
-" clockIsSet = hexToBit(4, 1)\n"
+" rtcIsSet = hexToBit(4, 0);\n"
+" clockIsSet = hexToBit(4, 1);\n"
" sourceIsOk = hexToBit(4, 2);\n"
" rateIsLocked = hexToBit(4, 3);\n"
" timeIsLocked = hexToBit(5, 0);\n"
@@ -103,7 +103,7 @@
" var now = new Date(msCount - msCountAtRtcSet + msRtc);\n"
" var leapStart = new Date(leapyear, leapmonth - 1, 1, 0, 0, leapBackward ? -1: 0);\n"
" \n"
-" if (now < leapStart) return; //Do nothing until reached the leap start\n"
+" if (now.getTime() < leapStart.getTime()) return; //Do nothing until reached the leap start\n"
" \n"
" if (leapBackward) { msRtc += 1000; leaps -= 1; } //skip 59\n"
" else { msRtc -= 1000; leaps += 1; } //repeat 59\n"