# HG changeset patch # User William Astle # Date 1468716961 21600 # Node ID cf915ece9e484f8405b9f3c95e688543c1ea33fd # Parent 2e382e1a173e84176679c8cfd934483a999f376b Remove "week day" from the TIME response The week day item in the TIME response is useless. Drivewire 4 doesn't return it and since that is the most common Drivewire implementation, it makes sense to conform to that definition. diff -r 2e382e1a173e -r cf915ece9e48 docs/protocol.txt --- a/docs/protocol.txt Sat Jun 11 12:26:39 2016 -0600 +++ b/docs/protocol.txt Sat Jul 16 18:56:01 2016 -0600 @@ -119,14 +119,19 @@ 3 hour (0-23) 4 minute (0-59) 5 second (0-60) - 6 day of week (0-6, 0 = Sunday) This packet roughly corresponds to the return structure for the localtime() function in C. Note that this request is part of the original Drivewire 3 specification. However, Drivewire 3 specifies only 0-59 for the seconds value. LWWire allows the value 60 for the seconds value for the rare case where a leap second is in effect. This is unlikely to ever be a problem in -real deployments since leap seconds can occur at most four times per year. +real deployments since leap seconds can occur at most twelve times per year. + +The original Drivewire 3 ipmlementation returned a seventh octet which +encoded the day of the week with Sunday as 0. Since the most common +Drivewire implementation is the Drivewire 4 server which only sends the six +octets and the day of the week value is basically useless, this +specification conforms to the Drivewire 4 implementation. 46 PRINTFLUSH diff -r 2e382e1a173e -r cf915ece9e48 src/lwwire.c --- a/src/lwwire.c Sat Jun 11 12:26:39 2016 -0600 +++ b/src/lwwire.c Sat Jul 16 18:56:01 2016 -0600 @@ -174,8 +174,7 @@ buf[3] = tmval -> tm_hour; buf[4] = tmval -> tm_min; buf[5] = tmval -> tm_sec; - buf[6] = tmval -> tm_wday; - lwwire_write(buf, 7); + lwwire_write(buf, 6); break; case 0x46: // PRINTFLUSH