summaryrefslogtreecommitdiffstats
path: root/app/dcf77.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/dcf77.c')
-rw-r--r--app/dcf77.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/dcf77.c b/app/dcf77.c
index 2e9a9a4..909188b 100644
--- a/app/dcf77.c
+++ b/app/dcf77.c
@@ -10,7 +10,8 @@
static Event_ring dcf77_ring;
-uint64_t dcf77_last_second;
+static uint64_t dcf77_last_second;
+uint64_t dcf77_last_happy;
void exti15_10_isr (void)
{
@@ -71,8 +72,12 @@ static void process_bits (uint64_t abs)
if (bits[17]) dcf77_time.s -= 3600; /*CEST*/
+ dcf77_last_happy = abs - (int64_t) 60 * (int64_t) HZ;
+
pll_set_offset (dcf77_time, abs);
+
+
printf ("DCF77: Next minute is: %02d-%02d-%02d %02d:%02d\r\n", u.year, u.month, u.mday, u.hour, u.minute);
time_print_epoch ("DCF77: ", dcf77_time);
@@ -161,7 +166,7 @@ void dcf77_dispatch (void)
abs = abs_extend (now);
dcf77_last_second = abs;
- //pll_dispatch (abs);
+ pll_dispatch (dcf77_last_happy, abs, "DCF77");
if (time_known)
report_time (abs);