Coder Social home page Coder Social logo

Comments (4)

Frank-Bemelman avatar Frank-Bemelman commented on July 24, 2024 1

That's fantastic - setting the scrollAlign to PA_RIGHT is the crux of the matter here. I would never figured that out, not even by accident. PA_LEFT and setScrollSpacing(1) and that is all. My fix into the rubbish bin, all the better. You really seem to have nailed everything in this library. Apologies for wasting your time and many thanks for your kind help!

Absolutely brilliant.

from md_parola.

MajicDesigns avatar MajicDesigns commented on July 24, 2024

Thanks. Happy to hear that you are enjoying using the library.

I think the setting you were looking for is setScrtollSpacing(). Documentation entry:

void MD_Parola::setScrollSpacing (uint16_t space)  

Set the horizontal scrolling distance between messages for all the zones.

When scrolling horizontally, the distance between the end of one message and the start of the next can be set using this method. Default behavior is for the message to be fully off the display before the new message starts. Set to zero for default behavior.

from md_parola.

Frank-Bemelman avatar Frank-Bemelman commented on July 24, 2024

Thank you, but I actually do use setScrollSpacing(3) not 0.

With texts shorter than the display, and spacing set to 0 (default behaviour) the text runs off the display and when completely gone, the new message enters at the righthand side.

With texts shorter than the display, and spacing set to 1 (or 3 in my case), as soon as the text arrives at the most lefthand column, not entirely has scrolled off, the new message enters at the righthand side. Here we see a gap of empty fillers, because the display is longer than the message.

With the filler mechanism turned off, messages shorter than the display will be repeated without gaps.

To demonstrate the effect, I made a video that shows/explains it better.

I could use zones, but zones have predefined sizes and would not work here, I think..

https://www.youtube.com/watch?v=c9pWQCqJZHg

First parts is with setScrollSpacing(3) and the second part of the video is with the fillers off.

Do you see what I mean? ;-)

from md_parola.

MajicDesigns avatar MajicDesigns commented on July 24, 2024

The normal behaviour of Parola is to wait for the message to scroll off the screen (ie the last column of LEDs to disappear on the left) before the next message starts - this is as you observe. To do this the code counts the number of columns that are blank and compares it to the size of the display in columns. This is found in the block of code under the comment around line 124
// check if enough scrolled off to say that new message should start
in the 'exit' part of the code file you modified in the original post. (BTW, now I am looking at the code I would observe that you changed the code in the 'entry' part of the animation, not the exit, so I would suggest that you change it back).

To control the number of blank columns displayed after the scrolling message, the setScrollSpacing() method sets an internal variable that overrides this around line 130
if ((_scrollDistance != 0) && (maxCount > _scrollDistance)) maxCount = _scrollDistance;
This feature was added some time ago for someone who was looking for the same outcome as I understand you want, so it should work.

Note that the exit part of the code only becomes active when the message has ended the pause (which you have set to zero). Where it pauses will depend on what text justification you have set for the display - it looks to me like you have set LEFT justified. In this case the message will go to the left, pause (0) and then start to exit, at which time the check for the blank columns is done.

It seems to me that you probably need to set RIGHT justification so that the text goes into exit mode when it has fully entered the display wihtout going all the way to the other end. It would probably help you debug what is going on if you also temporarily enable the pause between animation entry and exit.

from md_parola.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.