udoklein / dcf77

Noise resilient DCF77 decoder library for Arduino
http://blog.blinkenlight.net/experiments/dcf77/dcf77-library/
GNU General Public License v3.0
91 stars 28 forks source link

Local_Clock not initialized #30

Closed nameoftherose closed 6 years ago

nameoftherose commented 6 years ago

I noticed that the Local_Clock is not initialized, its setup method (dcf77.h line 1323) is never being executed. Is there a reason for that?

udoklein commented 6 years ago

The local clock is automatically initialized. However from a consistency point of view I think the clock controller should call the setup anyway. The setup method was introduced because everything else also has a setup method. This can be useful during testing.

Fixing the issue might make the code slightly larger without adding any benefits. I will test a little bit on the size impact.

nameoftherose commented 6 years ago

I have done the modification you describe, but now I think it is better to leave it as is. The sketch should initialize the local clock if necessary to start it in a specific state and date/time.