chiark / gitweb /
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Ben Harris [Sun, 18 Nov 2018 11:46:50 +0000 (11:46 +0000)]
Correct error handling for clock_nanosleep().
It apparently returns its errors rather than setting errno.
Ben Harris [Sun, 18 Nov 2018 10:48:20 +0000 (10:48 +0000)]
Remove a spurious space.
Ben Harris [Sun, 18 Nov 2018 10:47:36 +0000 (10:47 +0000)]
Create a timer to catch CLOCK_REALTIME going backwards.
Not used yet: I've spotted a couple of other problems to fix first.
Ben Harris [Sat, 17 Nov 2018 12:33:06 +0000 (12:33 +0000)]
Block SIGINT and SIGTERM while emitting a pulse.
That should ensure that we emit a full pulse and don't either truncate
it or leave the GPIO line high because of those signals. SIGTERM will
catch a normal shutdown by systemd etc, SIGINT the manual killing of a
foreground process.
Ben Harris [Wed, 14 Nov 2018 00:26:35 +0000 (00:26 +0000)]
With "-s" specified, cope with empty or missing state file.
Ben Harris [Sun, 11 Nov 2018 18:24:37 +0000 (18:24 +0000)]
Implement reading from state file.
Ben Harris [Sun, 11 Nov 2018 15:54:18 +0000 (15:54 +0000)]
Record the current time displayed on the dial to a file.
This would allow for recovering from a power failure automatically, if
clunk bothered reading the file.
Ben Harris [Sun, 11 Nov 2018 14:09:41 +0000 (14:09 +0000)]
Better references in comments.
Ben Harris [Sun, 11 Nov 2018 12:13:28 +0000 (12:13 +0000)]
Adjust maxadvance doc to match 1 s advance rate.
Ben Harris [Sun, 11 Nov 2018 01:49:04 +0000 (01:49 +0000)]
Comment on pulse width and adjust advance rate.
Both based on the spec for Post Office clock 26 mark 6. This
specifies the pulse width (200-500 ms) and the advance rate (one pulse
per second).
Ben Harris [Fri, 9 Nov 2018 18:55:22 +0000 (18:55 +0000)]
Factor out code to raise and lower output line from pulse().
The timing code in pulse is slightly twiddly and will probably be the
same for all output implementations.
Ben Harris [Sat, 3 Nov 2018 23:06:07 +0000 (23:06 +0000)]
Make the boundary between ADVANCE and STOP variable at compile time.
Ben Harris [Sat, 3 Nov 2018 22:25:48 +0000 (22:25 +0000)]
Add an option to specify the current displayed time at startup.
Ben Harris [Sat, 3 Nov 2018 14:25:04 +0000 (14:25 +0000)]
Start keeping track of what time we think the clock is displaying.
Ben Harris [Sat, 3 Nov 2018 11:57:55 +0000 (11:57 +0000)]
Call tzset() explicitly at startup.
It's required in portable code before invoking localtime_r().
Ben Harris [Sat, 3 Nov 2018 11:56:58 +0000 (11:56 +0000)]
Make the "pulse" have non-zero width.
Since I think most impulse clocks advance on the trailing edge of the
pulse, this requires subtracting the pulse width from the wake-up
time.
Ben Harris [Sat, 3 Nov 2018 11:44:05 +0000 (11:44 +0000)]
Minimal beginnings of an impulse clock driver.
Currently says "tick!" every 30 seconds.