-
Notifications
You must be signed in to change notification settings - Fork 14
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
Bug: startTime delayed (max pollFrequency) #2
Comments
I already had some times that it won't even show the module even if it is still in the window and several pollFrequency updates made. |
Any idea why? |
Not really, I haven't looked into it yet. I just discovered that the module should be visible and it was still hidden, even 1 hour after it should be on. A simple MagicMirror restart solved it, so I don't really get why it was still hidden. Looking at the code, it should check this every pollFrequency... |
I have probably found the issue: MMM-MyCommute/MMM-MyCommute.js Line 534 in 609007d
Here change |
WOW! Thank you so much! I don't have time to test it at the moment, but it definitely looks really suspicious. |
I'm still testing it, but it seems that this solved it for me. |
I was thinking something along: At any time it's possible to calculate how long until the module needs to be shown. That could be used as delay before showing. If we set that as the delay until next update (instead of pollFreq.), the module would update and show at that time. |
Oh, that seems easier... |
@qistoph Unfortunately, I'm my module still won't show up sometimes (even after changing that |
That seems to fix it indeed! Thank you so much! Patched and pushed. |
For me unfortunately not. It was still times when it didn't wanted to show up. |
Hmmm, that might have been intentional. Since the module is using credits I wanted people to have control over the amount of credits the module is using. By limiting the visible time, the idea was, to also limit the amount of credits used. Maybe a complete redesign would be a better start... |
Yes that's right. However my approach will not change this behavior, the amount of credit used will be the same. |
I have eliminated all of the module not appering bug. It works for a week now without a problem. |
That sounds nice indeed.
A PR sounds nice. I would however like to keep supporting the global show/hide, because that is probably in use in other people's setups. I'm also using it to show/hide modules using the Remote Control module. It's also used in modules that support user profiles (facial recognition to show a person's own modules). |
Ok I will create the PR soon.
Hmm, I may not be right, but I think this change still allows these. When you use Remote Control you can still show hide the module, because it will call the hide method (that is still there). I don't really know how the profiles work, but I assume that you have to specify the modules or destinations for each user. That will still work. |
An update cycle is run periodically (see pollFrequency). The module is only shown if during this update cycle the current time is between startTime and endTime.
It would be better if the module would be shown as soon as the current time reaches
startTime
.The text was updated successfully, but these errors were encountered: