Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to the clock module regarding the notifications sent. #1770

Merged
merged 1 commit into from
Oct 1, 2019
Merged

Conversation

buxxi
Copy link
Contributor

@buxxi buxxi commented Sep 22, 2019

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?

… sending of CLOCK_SECOND when displaySeconds not set. Avoid drifting by calculating the interval each time and use setTimeout instead of setInterval. Make sure the values sent with CLOCK_SECOND and CLOCK_MINUTE has the correct values instead of starting at 00:00 on startup
@MichMich MichMich merged commit ba4f486 into MagicMirrorOrg:develop Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants