AaronLiddiment / LEDText

FastLED Flexible Text Message Class requires LEDMatrix Class
89 stars 32 forks source link

Freeze on end of text #3

Closed ChrisLaurie closed 7 years ago

ChrisLaurie commented 7 years ago

I am looking for a way to freeze the last portion of the scrolling text. The idea is that the text scrolls in and instead of scrolling all the way through until there is nothing left to show on the matrix, it stops on a "full frame".

Currently I can detect when the last pixel has scrolled of (UpdateText returns -1). Is there a way to detect when there are no more characters left to scroll?

I was thinking about a new property for the class for this that is set somewhere in UpdateText.

AaronLiddiment commented 7 years ago

Hi, There are several ways to do what you want :) If you look at the Wiki and go to Page 4 you will find a list of special codes that can be used. EFFECT_CUSTOM_RC "\xNN" If you use this code just after your last letter it will return your code as the return code. You might have to add an extra space character after it though. EFFECT_DELAY_FRAMES "\xHH\xLL" This would allow you to freeze the display on the last frame for upto 65536 frames. It has the benefit that you could keep calling the update function to redraw the frame. void SetOptionsChangeMode(INSTANT_OPTIONS_MODE) This function changes the way scroll direction changes are handled, making them happen instantly. It also means that as soon as the last character is rendered the update function will return a -1.

Hope this helps.