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

Problem Text Flickers #13

Open
ValDY69 opened this issue Apr 26, 2018 · 9 comments
Open

Problem Text Flickers #13

ValDY69 opened this issue Apr 26, 2018 · 9 comments

Comments

@ValDY69
Copy link

ValDY69 commented Apr 26, 2018

Hello Brian ,
How are you ?

I am doing some test with differents texts and logos on a 128*128 LED panels

I notice that when there are some fixed text or logo (TextAnimations.On() method for exemple ) ,
the text or logo Flickers

I try to change FPS but no change ..

How i can resolve this problem ?

with scolling text i have not noticed any flickers problems , it's strange ..

I don't remenber but with older versions of your lib i have not seen this problem earlier ..

there is no problem on the windows simulator

can you help me please ?

Regards , Valentin

@BNNorman
Copy link
Owner

BNNorman commented Apr 26, 2018

The fact it doesn't happen with other text animations suggests it's the coding of the On animation.
Could you try recoding it as below so it only calls self.DrawText() when the animation is initialised and let me know if it fixes it. If so I'll push the changes to github.

I have to confess that although I wrote it I didn't really test it. (Slapped wrist)

class On(TextAnimBase):
    """
   On simply displays the given text message until the duration expires
    """
   def step(self):
        if self.init:
              self.drawText()
       self.refreshCanvas()

@BNNorman
Copy link
Owner

BNNorman commented Apr 26, 2018

Darn - the python indents disappeared after I posted.
I have updated the comment.

@ValDY69
Copy link
Author

ValDY69 commented Apr 26, 2018

thanks brian for your quick answer !

but unlucky it's not working with this change
it seems that it's a little bit more flickers ...

@BNNorman
Copy link
Owner

Ok, it is related to the foreground colour - if you set the foreground to a single colour there's no flickering. If you use a palette what happens is the code redraws the text using the next color in the list when the animation resets. The reason the simulator doesn't show this effect is that it can run much faster than the physical panel hence the effect is less noticeable.
I'll have a look at the rendering code to see if I can find out why multicolored palettes do this when they should only change the color when the animation duration is over.

@BNNorman
Copy link
Owner

BNNorman commented Apr 27, 2018

Fixed - whoops, forgot to make self.init False

class On(TextAnimBase):
    """
   On simply displays the given text message until the duration expires
    """
   def step(self):
        if self.init:
              self.drawText()
              self.init=False        <--- missing line
       self.refreshCanvas()

Was steady on my panel after the missing line was added. I have pushed it to github

@ValDY69
Copy link
Author

ValDY69 commented Apr 27, 2018

i test your new code now and no change ... the problem is still here

@BNNorman
Copy link
Owner

BNNorman commented Apr 27, 2018 via email

@ValDY69
Copy link
Author

ValDY69 commented Apr 27, 2018

i edit my copy with your modif in this issue + OFFmultiColored = False

class On(TextAnimBase):
"""
On simply displays the given text message until the duration expires
"""
def step(self):
if self.init:
self.drawText()
self.init=False <--- missing line
self.refreshCanvas()


#multiColored=False  # now in the text object
OFFmultiColored = False  # depracated, now in the text object

@ValDY69
Copy link
Author

ValDY69 commented Apr 27, 2018

i precise that this problem is not really visible for me an a 6464 led panels but much more present on a bigger screen like 128128 !

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

No branches or pull requests

2 participants