From 3c8830695bdf89c90dc5b3bf90d77c5e54522964 Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Mon, 8 Apr 2019 21:20:42 +0200 Subject: [PATCH] DCF77 pulse generator runtime optimized --- src/dcf77.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/dcf77.cpp b/src/dcf77.cpp index d240976d..45924528 100644 --- a/src/dcf77.cpp +++ b/src/dcf77.cpp @@ -26,8 +26,8 @@ void DCF77_Pulse(time_t t, uint8_t const *DCFpulse) { ESP_LOGD(TAG, "[%02d:%02d:%02d.%03d] DCF second %d", hour(t), minute(t), second(t), millisecond(), sec); - // induce 10 pulses - for (uint8_t pulse = 0; pulse <= 9; pulse++) { + // induce a DCF Pulse + for (uint8_t pulse = 0; pulse <= 2; pulse++) { switch (pulse) { @@ -45,9 +45,6 @@ void DCF77_Pulse(time_t t, uint8_t const *DCFpulse) { digitalWrite(HAS_DCF77, dcf_high); break; - case 9: // 900ms after start -> last pulse - break; - } // switch // pulse pause