Changes to the clock module regarding the notifications sent. #1770
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Noticed that the CLOCK_SECOND and CLOCK_MINUTE always started at 0 and counted up, seems more useful to actually send the actual minute and second and not minute and seconds since startup.
Also there's a fix for the notifications drifting after a while, since setInterval schedules how much time should be between the end of the first call and start of the second, not the start for both.
Also disabled the sending of CLOCK_SECOND-notification if displaySeconds is not set in configs since it should be no use then if it isn't even displayed? I wanted this to avoid the logging of those notifications when debugging and also trying to lower the cpu usage since I'm running my client on a Raspberry Pi Zero W. Maybe it should be a configuration-option to enable this event even when not displaying seconds?