From 5bbfb7ea728b08d737c28238a4c3d9b5afb42bb6 Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Sun, 24 Mar 2019 20:12:03 +0100 Subject: [PATCH] timesync 1sec fix --- src/timesync.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/timesync.cpp b/src/timesync.cpp index aa96f6ab..f0a9b1a4 100644 --- a/src/timesync.cpp +++ b/src/timesync.cpp @@ -140,10 +140,10 @@ void process_timesync_req(void *taskparameter) { if (timeIsValid(time_to_set)) { // wait until top of second with 4ms precision - time_to_set++; // advance time 1 sec wait time vTaskDelay(pdMS_TO_TICKS(1000 - time_to_set_fraction_msec)); #ifdef HAS_RTC + time_to_set++; // advance time 1 sec wait time // set RTC time and calibrate RTC_INT pulse on top of second set_rtctime(time_to_set, no_mutex); #endif @@ -151,7 +151,7 @@ void process_timesync_req(void *taskparameter) { #if (!defined GPS_INT && !defined RTC_INT) // sync pps timer to top of second timerRestart(ppsIRQ); // reset pps timer - CLOCKIRQ(); // fire clock pps + CLOCKIRQ(); // fire clock pps, advances time 1 sec #endif setTime(time_to_set); // set the time on top of second