From f319d669ec87a93fa15c808aa91b6e4a561ec61f Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Thu, 7 Feb 2019 23:11:10 +0100 Subject: [PATCH] DCF77+IF482 code sanitizations --- src/dcf77.cpp | 4 ---- src/if482.cpp | 4 +--- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/dcf77.cpp b/src/dcf77.cpp index 54856953..29182a5f 100644 --- a/src/dcf77.cpp +++ b/src/dcf77.cpp @@ -1,9 +1,6 @@ /* // Emulate a DCF77 radio receiver // -// parts of this code werde adapted from source: -https://www.elektormagazine.com/labs/dcf77-emulator-with-esp8266-elektor-labs-version-150713 -// // a nice & free logic test program for DCF77 can be found here: https://www-user.tu-chemnitz.de/~heha/viewzip.cgi/hs/Funkuhr.zip/ // @@ -25,7 +22,6 @@ uint8_t DCFtimeframe[DCF77_FRAME_SIZE]; // initialize and configure DCF77 output int dcf77_init(void) { - time_t t, tt; BitsPending = false; pinMode(HAS_DCF77, OUTPUT); diff --git a/src/if482.cpp b/src/if482.cpp index cfa3ec71..da582716 100644 --- a/src/if482.cpp +++ b/src/if482.cpp @@ -152,7 +152,6 @@ void if482_loop(void *pvParameters) { configASSERT(((uint32_t)pvParameters) == 1); // FreeRTOS check TickType_t wakeTime; - time_t t, tt; const TickType_t timeOffset = pdMS_TO_TICKS(IF482_OFFSET); // duration of telegram transmit const TickType_t startTime = xTaskGetTickCount(); // now @@ -172,8 +171,7 @@ void if482_loop(void *pvParameters) { portMAX_DELAY); // wait forever (missing error handling here...) #if !defined RTC_CLK || (RTC_CLK == IF482_PULSE_DURATION) // we don't need clock rescaling - // now we're synced to start of second tt and wait - // until it's time to start transmit telegram for tt+1 + // wait until it's time to start transmit telegram for next second vTaskDelayUntil(&wakeTime, shotTime); // sets waketime to moment of shot IF482.print(IF482_Out(now() + 1));