DCF77+IF482 code sanitizations
This commit is contained in:
parent
bad5805810
commit
f319d669ec
@ -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);
|
||||
|
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user