Need help with screensaver.digitalclock
#1
Hi!
The bounce effect has been broken since Kodi 17.
Essentially the text starts moving properly and then it starts jittering.
I've worked with @Milhouse on figuring out when it became broken and it was LibreELEC.tv Leia build #0208.
The changelog is here:
https://forum.kodi.tv/showthread.php?tid...pid2520397
As far as I can tell the issue is with the following:
Application: Add decay before python door closes (7066e497)
Application: Allow python door to open for up to 80ms (5d6c8abf)

In order to make the text bounce around the screen I need to use waitForAbort(0.02).
Essentially the loop needs to move text every 20ms so that it looks smooth.

I've also worked with @popcornmix 
And he pointed out this is happening because the screensaver is calling into Kodi too often (50 times a second).
He said that if I call in less than once per vsync it should be better.
He suggested I use python sleep and then once a second call self.monitor.waitForAbort(0.02).

Unfortunately I don't know how to do that, I've learned Python by myself just enough to be able to create this screensaver, so I'm completely out of my depth.

I use self.monitor.waitForAbort(0.02) as means of setting the "speed" of the main loop that essentially controls the screensaver.
I don't know how use python sleep instead of it, and then once per second call self.monitor.waitForAbort(0.02).

If anyone can help that would be great, as I would like to bring back the nice looking bounce effect to the screensaver.

This is the screensaver code:
https://github.com/vdb86/screensaver.dig...default.py
Digital Clock Screensaver with a lot of options - check it out!
Reply
#2
An update:
I've figured out how to use time.sleep instead of self.monitor.waitForAbort(0.02) and then call self.monitor.waitForAbort(0.02) every second.
That didn't help.
So I've commented out most of the code and made sure the main loop had only most important things running, still no dice.
It seems that if I'm sending any commands to Kodi at 0.02 seconds the issue will persist.
Currently the only thing that's contacting Kodi is self.container.setPosition(new_x,new_y)

That part is absolutely needed and it needs to run at 0.02 seconds as it moves the text around the screen.

So at this point the main question is: How to move the text around the screen, with nice animation, without calling into Kodi too often...
Digital Clock Screensaver with a lot of options - check it out!
Reply
#3
@enen92 any ideas?
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#4
This is the test code where I've applied all of the changes and commented out everything that's not needed:
https://github.com/vdb86/screensaver.dig...y-movement

Essentially only bouncing logic is left (you need to select that in addon settings as movement option) and it's still making the text jitter.
Digital Clock Screensaver with a lot of options - check it out!
Reply
#5
I'm back to developing this screensaver a bit more and adding some additional features.
I would still love to get the bounce effect working without stuttering.
@phunkyfish
@enen92
Or anyone else, please help Smile
Digital Clock Screensaver with a lot of options - check it out!
Reply
#6
@Hitcher
Any chance you could help?
🙏
Digital Clock Screensaver with a lot of options - check it out!
Reply
#7
Python isn't my area, sorry.
Reply
#8
Thank you anyway 🙌
Digital Clock Screensaver with a lot of options - check it out!
Reply

Logout Mark Read Team Forum Stats Members Help
Need help with screensaver.digitalclock0